System.Win32.Registry

Win32-2.12.0.0: A binding to Windows Win32 API.

Copyright | (c) Alastair Reid 1997-2003
License | BSD-style (see the file libraries/base/LICENSE)
Maintainer | Esa Ilari Vuokko <ei@vuokko.info>
Stability | provisional
Portability | portable
Safe Haskell | Trustworthy
Language | Haskell2010

System.Win32.Registry

Contents

- HKEY
- Creation options
- REGSAM
- Registry operations

Description

A collection of FFI declarations for accessing the Win32 registry.

Synopsis

- type HKEY = ForeignHANDLE
- hKEY_CLASSES_ROOT :: HKEY
- hKEY_CURRENT_CONFIG :: HKEY
- hKEY_CURRENT_USER :: HKEY
- hKEY_LOCAL_MACHINE :: HKEY
- hKEY_USERS :: HKEY
- type RegCreateOptions = DWORD
- rEG_OPTION_NON_VOLATILE :: RegCreateOptions
- rEG_OPTION_VOLATILE :: RegCreateOptions
- type REGSAM = Word32
- kEY_ALL_ACCESS :: REGSAM
- kEY_CREATE_LINK :: REGSAM
- kEY_CREATE_SUB_KEY :: REGSAM
- kEY_ENUMERATE_SUB_KEYS :: REGSAM
- kEY_EXECUTE :: REGSAM
- kEY_NOTIFY :: REGSAM
- kEY_QUERY_VALUE :: REGSAM
- kEY_READ :: REGSAM
- kEY_SET_VALUE :: REGSAM
- kEY_WRITE :: REGSAM
- regCloseKey :: HKEY -> IO ()
- regConnectRegistry :: Maybe String -> HKEY -> IO HKEY
- regCreateKey :: HKEY -> String -> IO HKEY
- regCreateKeyEx :: HKEY -> String -> Maybe String -> RegCreateOptions -> REGSAM -> Maybe LPSECURITY_ATTRIBUTES -> IO (HKEY, Bool)
- regDeleteKey :: HKEY -> String -> IO ()
- regDeleteValue :: HKEY -> String -> IO ()
- regEnumKeys :: HKEY -> IO [String]
- regEnumKeyVals :: HKEY -> IO [(String, String, RegValueType)]
- regEnumKey :: HKEY -> DWORD -> LPTSTR -> DWORD -> IO (String, Int)
- regEnumValue :: HKEY -> DWORD -> LPTSTR -> DWORD -> LPBYTE -> DWORD -> IO (RegValueType, String, Int)
- regFlushKey :: HKEY -> IO ()
- regLoadKey :: HKEY -> String -> String -> IO ()
- regUnLoadKey :: HKEY -> String -> IO ()
- regNotifyChangeKeyValue :: HKEY -> Bool -> RegNotifyOptions -> HANDLE -> Bool -> IO ()
- type RegNotifyOptions = DWORD
- rEG_NOTIFY_CHANGE_NAME :: RegNotifyOptions
- rEG_NOTIFY_CHANGE_ATTRIBUTES :: RegNotifyOptions
- rEG_NOTIFY_CHANGE_LAST_SET :: RegNotifyOptions
- rEG_NOTIFY_CHANGE_SECURITY :: RegNotifyOptions
- regOpenKey :: HKEY -> String -> IO HKEY
- regOpenKeyEx :: HKEY -> String -> REGSAM -> IO HKEY
- regQueryInfoKey :: HKEY -> IO RegInfoKey
- data RegInfoKey = RegInfoKey {
  - class_string :: String
  - class_id :: Int
  - subkeys :: Word32
  - max_subkey_len :: Word32
  - max_class_len :: Word32
  - values :: Word32
  - max_value_name_len :: Word32
  - max_value_len :: Word32
  - sec_len :: Int
  - lastWrite_lo :: Word32
  - lastWrite_hi :: Word32
  }
- regQueryValue :: HKEY -> Maybe String -> IO String
- regQueryValueKey :: HKEY -> Maybe String -> IO String
- regQueryDefaultValue :: HKEY -> String -> IO String
- regQueryValueEx :: HKEY -> String -> LPBYTE -> Int -> IO RegValueType
- regReplaceKey :: HKEY -> Maybe String -> String -> String -> IO ()
- type RegRestoreFlags = DWORD
- rEG_WHOLE_HIVE_VOLATILE :: RegRestoreFlags
- rEG_REFRESH_HIVE :: RegRestoreFlags
- rEG_NO_LAZY_FLUSH :: RegRestoreFlags
- regRestoreKey :: HKEY -> String -> RegRestoreFlags -> IO ()
- regSaveKey :: HKEY -> String -> Maybe LPSECURITY_ATTRIBUTES -> IO ()
- regGetValue :: HKEY -> Maybe String -> Maybe String -> RegTypeRestriction -> Maybe LPDWORD -> Maybe LPVOID -> Maybe LPDWORD -> IO ()
- type RegTypeRestriction = DWORD
- rRF_RT_ANY :: RegTypeRestriction
- rRF_RT_DWORD :: RegTypeRestriction
- rRF_RT_QWORD :: RegTypeRestriction
- rRF_RT_REG_BINARY :: RegTypeRestriction
- rRF_RT_REG_DWORD :: RegTypeRestriction
- rRF_RT_REG_EXPAND_SZ :: RegTypeRestriction
- rRF_RT_REG_MULTI_SZ :: RegTypeRestriction
- rRF_RT_REG_NONE :: RegTypeRestriction
- rRF_RT_REG_QWORD :: RegTypeRestriction
- rRF_RT_REG_SZ :: RegTypeRestriction
- rRF_NOEXPAND :: RegTypeRestriction
- rRF_ZEROONFAILURE :: RegTypeRestriction
- rRF_SUBKEY_WOW6464KEY :: RegTypeRestriction
- rRF_SUBKEY_WOW6432KEY :: RegTypeRestriction
- regSetValue :: HKEY -> String -> String -> IO ()
- regSetValueEx :: HKEY -> String -> RegValueType -> LPTSTR -> Int -> IO ()
- type RegValueType = DWORD
- rEG_BINARY :: RegValueType
- rEG_DWORD :: RegValueType
- rEG_DWORD_LITTLE_ENDIAN :: RegValueType
- rEG_DWORD_BIG_ENDIAN :: RegValueType
- rEG_EXPAND_SZ :: RegValueType
- rEG_LINK :: RegValueType
- rEG_MULTI_SZ :: RegValueType
- rEG_NONE :: RegValueType
- rEG_RESOURCE_LIST :: RegValueType
- rEG_SZ :: RegValueType
- regSetStringValue :: HKEY -> String -> String -> IO ()

# HKEY

type HKEY = ForeignHANDLE Source #

hKEY_CLASSES_ROOT :: HKEY Source #

hKEY_CURRENT_CONFIG :: HKEY Source #

hKEY_CURRENT_USER :: HKEY Source #

hKEY_LOCAL_MACHINE :: HKEY Source #

hKEY_USERS :: HKEY Source #

# Creation options

type RegCreateOptions = DWORD Source #

rEG_OPTION_NON_VOLATILE :: RegCreateOptions Source #

rEG_OPTION_VOLATILE :: RegCreateOptions Source #

# REGSAM

type REGSAM = Word32 Source #

kEY_ALL_ACCESS :: REGSAM Source #

kEY_CREATE_LINK :: REGSAM Source #

kEY_CREATE_SUB_KEY :: REGSAM Source #

kEY_ENUMERATE_SUB_KEYS :: REGSAM Source #

kEY_EXECUTE :: REGSAM Source #

kEY_NOTIFY :: REGSAM Source #

kEY_QUERY_VALUE :: REGSAM Source #

kEY_READ :: REGSAM Source #

kEY_SET_VALUE :: REGSAM Source #

kEY_WRITE :: REGSAM Source #

# Registry operations

regCloseKey :: HKEY -> IO () Source #

regConnectRegistry :: Maybe String -> HKEY -> IO HKEY Source #

regCreateKey :: HKEY -> String -> IO HKEY Source #

regCreateKeyEx :: HKEY -> String -> Maybe String -> RegCreateOptions -> REGSAM -> Maybe LPSECURITY_ATTRIBUTES -> IO (HKEY, Bool) Source #

regDeleteKey :: HKEY -> String -> IO () Source #

regDeleteValue :: HKEY -> String -> IO () Source #

regEnumKeys :: HKEY -> IO [String] Source #

regEnumKeyVals :: HKEY -> IO [(String, String, RegValueType)] Source #

regEnumKey :: HKEY -> DWORD -> LPTSTR -> DWORD -> IO (String, Int) Source #

regEnumValue :: HKEY -> DWORD -> LPTSTR -> DWORD -> LPBYTE -> DWORD -> IO (RegValueType, String, Int) Source #

regFlushKey :: HKEY -> IO () Source #

regLoadKey :: HKEY -> String -> String -> IO () Source #

regUnLoadKey :: HKEY -> String -> IO () Source #

regNotifyChangeKeyValue :: HKEY -> Bool -> RegNotifyOptions -> HANDLE -> Bool -> IO () Source #

type RegNotifyOptions = DWORD Source #

rEG_NOTIFY_CHANGE_NAME :: RegNotifyOptions Source #

rEG_NOTIFY_CHANGE_ATTRIBUTES :: RegNotifyOptions Source #

rEG_NOTIFY_CHANGE_LAST_SET :: RegNotifyOptions Source #

rEG_NOTIFY_CHANGE_SECURITY :: RegNotifyOptions Source #

regOpenKey :: HKEY -> String -> IO HKEY Source #

regOpenKeyEx :: HKEY -> String -> REGSAM -> IO HKEY Source #

regQueryInfoKey :: HKEY -> IO RegInfoKey Source #

data RegInfoKey Source #

Constructors

RegInfoKey |
Fields class_string :: String class_id :: Int subkeys :: Word32 max_subkey_len :: Word32 max_class_len :: Word32 values :: Word32 max_value_name_len :: Word32 max_value_len :: Word32 sec_len :: Int lastWrite_lo :: Word32 lastWrite_hi :: Word32

regQueryValue :: HKEY -> Maybe String -> IO String Source #

regQueryValueKey :: HKEY -> Maybe String -> IO String Source #

Deprecated: Use regQueryValue instead.

regQueryDefaultValue :: HKEY -> String -> IO String Source #

regQueryValueEx :: HKEY -> String -> LPBYTE -> Int -> IO RegValueType Source #

regReplaceKey :: HKEY -> Maybe String -> String -> String -> IO () Source #

type RegRestoreFlags = DWORD Source #

rEG_WHOLE_HIVE_VOLATILE :: RegRestoreFlags Source #

rEG_REFRESH_HIVE :: RegRestoreFlags Source #

rEG_NO_LAZY_FLUSH :: RegRestoreFlags Source #

regRestoreKey :: HKEY -> String -> RegRestoreFlags -> IO () Source #

regSaveKey :: HKEY -> String -> Maybe LPSECURITY_ATTRIBUTES -> IO () Source #

regGetValue :: HKEY -> Maybe String -> Maybe String -> RegTypeRestriction -> Maybe LPDWORD -> Maybe LPVOID -> Maybe LPDWORD -> IO () Source #

type RegTypeRestriction = DWORD Source #

rRF_RT_ANY :: RegTypeRestriction Source #

rRF_RT_DWORD :: RegTypeRestriction Source #

rRF_RT_QWORD :: RegTypeRestriction Source #

rRF_RT_REG_BINARY :: RegTypeRestriction Source #

rRF_RT_REG_DWORD :: RegTypeRestriction Source #

rRF_RT_REG_EXPAND_SZ :: RegTypeRestriction Source #

rRF_RT_REG_MULTI_SZ :: RegTypeRestriction Source #

rRF_RT_REG_NONE :: RegTypeRestriction Source #

rRF_RT_REG_QWORD :: RegTypeRestriction Source #

rRF_RT_REG_SZ :: RegTypeRestriction Source #

rRF_NOEXPAND :: RegTypeRestriction Source #

rRF_ZEROONFAILURE :: RegTypeRestriction Source #

rRF_SUBKEY_WOW6464KEY :: RegTypeRestriction Source #

rRF_SUBKEY_WOW6432KEY :: RegTypeRestriction Source #

regSetValue :: HKEY -> String -> String -> IO () Source #

regSetValueEx :: HKEY -> String -> RegValueType -> LPTSTR -> Int -> IO () Source #

type RegValueType = DWORD Source #

rEG_BINARY :: RegValueType Source #

rEG_DWORD :: RegValueType Source #

rEG_DWORD_LITTLE_ENDIAN :: RegValueType Source #

rEG_DWORD_BIG_ENDIAN :: RegValueType Source #

rEG_EXPAND_SZ :: RegValueType Source #

rEG_LINK :: RegValueType Source #

rEG_MULTI_SZ :: RegValueType Source #

rEG_NONE :: RegValueType Source #

rEG_RESOURCE_LIST :: RegValueType Source #

rEG_SZ :: RegValueType Source #

regSetStringValue :: HKEY -> String -> String -> IO () Source #