| 1 | /* $Id: winreg.h,v 1.5 2000-04-19 14:46:37 sandervl Exp $ */
|
|---|
| 2 |
|
|---|
| 3 | /*
|
|---|
| 4 | * Shell Library definitions
|
|---|
| 5 | */
|
|---|
| 6 | #ifndef __WINE_WINREG_H
|
|---|
| 7 | #define __WINE_WINREG_H
|
|---|
| 8 |
|
|---|
| 9 | #include "winbase.h"
|
|---|
| 10 | #include "winnt.h"
|
|---|
| 11 |
|
|---|
| 12 | /*
|
|---|
| 13 | #define SHELL_ERROR_SUCCESS 0L
|
|---|
| 14 | #define SHELL_ERROR_BADDB 1L
|
|---|
| 15 | #define SHELL_ERROR_BADKEY 2L
|
|---|
| 16 | #define SHELL_ERROR_CANTOPEN 3L
|
|---|
| 17 | #define SHELL_ERROR_CANTREAD 4L
|
|---|
| 18 | #define SHELL_ERROR_CANTWRITE 5L
|
|---|
| 19 | #define SHELL_ERROR_OUTOFMEMORY 6L
|
|---|
| 20 | #define SHELL_ERROR_INVALID_PARAMETER 7L
|
|---|
| 21 | #define SHELL_ERROR_ACCESS_DENIED 8L
|
|---|
| 22 | */
|
|---|
| 23 |
|
|---|
| 24 | #define REG_NONE 0 /* no type */
|
|---|
| 25 | #define REG_SZ 1 /* string type (ASCII) */
|
|---|
| 26 | #define REG_EXPAND_SZ 2 /* string, includes %ENVVAR% (expanded by caller) (ASCII) */
|
|---|
| 27 | #define REG_BINARY 3 /* binary format, callerspecific */
|
|---|
| 28 | /* YES, REG_DWORD == REG_DWORD_LITTLE_ENDIAN */
|
|---|
| 29 | #define REG_DWORD 4 /* DWORD in little endian format */
|
|---|
| 30 | #define REG_DWORD_LITTLE_ENDIAN 4 /* DWORD in little endian format */
|
|---|
| 31 | #define REG_DWORD_BIG_ENDIAN 5 /* DWORD in big endian format */
|
|---|
| 32 | #define REG_LINK 6 /* symbolic link (UNICODE) */
|
|---|
| 33 | #define REG_MULTI_SZ 7 /* multiple strings, delimited by \0, terminated by \0\0 (ASCII) */
|
|---|
| 34 | #define REG_RESOURCE_LIST 8 /* resource list? huh? */
|
|---|
| 35 | #define REG_FULL_RESOURCE_DESCRIPTOR 9 /* full resource descriptor? huh? */
|
|---|
| 36 | #define REG_RESOURCE_REQUIREMENTS_LIST 10
|
|---|
| 37 |
|
|---|
| 38 | #define HEX_REG_NONE 0x80000000
|
|---|
| 39 | #define HEX_REG_SZ 0x80000001
|
|---|
| 40 | #define HEX_REG_EXPAND_SZ 0x80000002
|
|---|
| 41 | #define HEX_REG_BINARY 0x80000003
|
|---|
| 42 | #define HEX_REG_DWORD 0x80000004
|
|---|
| 43 | #define HEX_REG_DWORD_LITTLE_ENDIAN 0x80000004
|
|---|
| 44 | #define HEX_REG_DWORD_BIG_ENDIAN 0x80000005
|
|---|
| 45 | #define HEX_REG_LINK 0x80000006
|
|---|
| 46 | #define HEX_REG_MULTI_SZ 0x80000007
|
|---|
| 47 | #define HEX_REG_RESOURCE_LIST 0x80000008
|
|---|
| 48 | #define HEX_REG_FULL_RESOURCE_DESCRIPTOR 0x80000009
|
|---|
| 49 |
|
|---|
| 50 | #define HKEY_CLASSES_ROOT ((HKEY) 0x80000000)
|
|---|
| 51 | #define HKEY_CURRENT_USER ((HKEY) 0x80000001)
|
|---|
| 52 | #define HKEY_LOCAL_MACHINE ((HKEY) 0x80000002)
|
|---|
| 53 | #define HKEY_USERS ((HKEY) 0x80000003)
|
|---|
| 54 | #define HKEY_PERFORMANCE_DATA ((HKEY) 0x80000004)
|
|---|
| 55 | #define HKEY_CURRENT_CONFIG ((HKEY) 0x80000005)
|
|---|
| 56 | #define HKEY_DYN_DATA ((HKEY) 0x80000006)
|
|---|
| 57 |
|
|---|
| 58 | #define REG_OPTION_RESERVED 0x00000000
|
|---|
| 59 | #define REG_OPTION_NON_VOLATILE 0x00000000
|
|---|
| 60 | #define REG_OPTION_VOLATILE 0x00000001
|
|---|
| 61 | #define REG_OPTION_CREATE_LINK 0x00000002
|
|---|
| 62 | #define REG_OPTION_BACKUP_RESTORE 0x00000004 /* FIXME */
|
|---|
| 63 | #define REG_OPTION_TAINTED 0x80000000 /* Internal? */
|
|---|
| 64 |
|
|---|
| 65 | #define REG_CREATED_NEW_KEY 0x00000001
|
|---|
| 66 | #define REG_OPENED_EXISTING_KEY 0x00000002
|
|---|
| 67 |
|
|---|
| 68 | /* For RegNotifyChangeKeyValue */
|
|---|
| 69 | #define REG_NOTIFY_CHANGE_NAME 0x1
|
|---|
| 70 |
|
|---|
| 71 | #define KEY_QUERY_VALUE 0x00000001
|
|---|
| 72 | #define KEY_SET_VALUE 0x00000002
|
|---|
| 73 | #define KEY_CREATE_SUB_KEY 0x00000004
|
|---|
| 74 | #define KEY_ENUMERATE_SUB_KEYS 0x00000008
|
|---|
| 75 | #define KEY_NOTIFY 0x00000010
|
|---|
| 76 | #define KEY_CREATE_LINK 0x00000020
|
|---|
| 77 |
|
|---|
| 78 | #define KEY_READ (STANDARD_RIGHTS_READ| \
|
|---|
| 79 | KEY_QUERY_VALUE| \
|
|---|
| 80 | KEY_ENUMERATE_SUB_KEYS|\
|
|---|
| 81 | KEY_NOTIFY \
|
|---|
| 82 | )
|
|---|
| 83 | #define KEY_WRITE (STANDARD_RIGHTS_WRITE| \
|
|---|
| 84 | KEY_SET_VALUE| \
|
|---|
| 85 | KEY_CREATE_SUB_KEY \
|
|---|
| 86 | )
|
|---|
| 87 | #define KEY_EXECUTE KEY_READ
|
|---|
| 88 | #define KEY_ALL_ACCESS (STANDARD_RIGHTS_ALL| \
|
|---|
| 89 | KEY_READ|KEY_WRITE| \
|
|---|
| 90 | KEY_CREATE_LINK \
|
|---|
| 91 | )
|
|---|
| 92 |
|
|---|
| 93 | /* fixme: move it to basetsd.h */
|
|---|
| 94 | typedef ULONG_PTR DWORD_PTR, *PDWORD_PTR;
|
|---|
| 95 | /* end fixme */
|
|---|
| 96 |
|
|---|
| 97 | /*
|
|---|
| 98 | * registry provider structs
|
|---|
| 99 | */
|
|---|
| 100 | typedef struct value_entA
|
|---|
| 101 | { LPSTR ve_valuename;
|
|---|
| 102 | DWORD ve_valuelen;
|
|---|
| 103 | DWORD_PTR ve_valueptr;
|
|---|
| 104 | DWORD ve_type;
|
|---|
| 105 | } VALENTA, *PVALENTA;
|
|---|
| 106 |
|
|---|
| 107 | typedef struct value_entW {
|
|---|
| 108 | LPWSTR ve_valuename;
|
|---|
| 109 | DWORD ve_valuelen;
|
|---|
| 110 | DWORD_PTR ve_valueptr;
|
|---|
| 111 | DWORD ve_type;
|
|---|
| 112 | } VALENTW, *PVALENTW;
|
|---|
| 113 |
|
|---|
| 114 | BOOL WINAPI LookupPrivilegeValueA(LPCSTR,LPCSTR,LPVOID);
|
|---|
| 115 | BOOL WINAPI LookupPrivilegeValueW(LPCWSTR,LPCWSTR,LPVOID);
|
|---|
| 116 | #define LookupPrivilegeValue WINELIB_NAME_AW(LookupPrivilegeValue)
|
|---|
| 117 | HANDLE WINAPI RegisterEventSourceA(LPCSTR,LPCSTR);
|
|---|
| 118 | HANDLE WINAPI RegisterEventSourceW(LPCWSTR,LPCWSTR);
|
|---|
| 119 | #define RegisterEventSource WINELIB_NAME_AW(RegisterEventSource)
|
|---|
| 120 | LONG WINAPI RegCreateKeyExA(HKEY,LPCSTR,DWORD,LPSTR,DWORD,REGSAM,
|
|---|
| 121 | LPSECURITY_ATTRIBUTES,LPHKEY,LPDWORD);
|
|---|
| 122 | LONG WINAPI RegCreateKeyExW(HKEY,LPCWSTR,DWORD,LPWSTR,DWORD,REGSAM,
|
|---|
| 123 | LPSECURITY_ATTRIBUTES,LPHKEY,LPDWORD);
|
|---|
| 124 | #define RegCreateKeyEx WINELIB_NAME_AW(RegCreateKeyEx)
|
|---|
| 125 | LONG WINAPI RegSaveKeyA(HKEY,LPCSTR,LPSECURITY_ATTRIBUTES);
|
|---|
| 126 | LONG WINAPI RegSaveKeyW(HKEY,LPCWSTR,LPSECURITY_ATTRIBUTES);
|
|---|
| 127 | #define RegSaveKey WINELIB_NAME_AW(RegSaveKey)
|
|---|
| 128 | LONG WINAPI RegSetKeySecurity(HKEY,SECURITY_INFORMATION,PSECURITY_DESCRIPTOR);
|
|---|
| 129 | BOOL WINAPI DeregisterEventSource(HANDLE);
|
|---|
| 130 | BOOL WINAPI GetFileSecurityA(LPCSTR,SECURITY_INFORMATION,PSECURITY_DESCRIPTOR,DWORD,LPDWORD);
|
|---|
| 131 | BOOL WINAPI GetFileSecurityW(LPCWSTR,SECURITY_INFORMATION,PSECURITY_DESCRIPTOR,DWORD,LPDWORD);
|
|---|
| 132 | #define GetFileSecurity WINELIB_NAME_AW(GetFileSecurity)
|
|---|
| 133 | BOOL WINAPI GetUserNameA(LPSTR,LPDWORD);
|
|---|
| 134 | BOOL WINAPI GetUserNameW(LPWSTR,LPDWORD);
|
|---|
| 135 | #define GetUserName WINELIB_NAME_AW(GetUserName)
|
|---|
| 136 | BOOL WINAPI OpenProcessToken(HANDLE,DWORD,HANDLE*);
|
|---|
| 137 | LONG WINAPI RegConnectRegistryA(LPCSTR,HKEY,LPHKEY);
|
|---|
| 138 | LONG WINAPI RegConnectRegistryW(LPCWSTR,HKEY,LPHKEY);
|
|---|
| 139 | #define RegConnectRegistry WINELIB_NAME_AW(RegConnectRegistry)
|
|---|
| 140 | LONG WINAPI RegEnumKeyExA(HKEY,DWORD,LPSTR,LPDWORD,LPDWORD,LPSTR,
|
|---|
| 141 | LPDWORD,LPFILETIME);
|
|---|
| 142 | LONG WINAPI RegEnumKeyExW(HKEY,DWORD,LPWSTR,LPDWORD,LPDWORD,LPWSTR,
|
|---|
| 143 | LPDWORD,LPFILETIME);
|
|---|
| 144 | #define RegEnumKeyEx WINELIB_NAME_AW(RegEnumKeyEx)
|
|---|
| 145 | LONG WINAPI RegGetKeySecurity(HKEY,SECURITY_INFORMATION,PSECURITY_DESCRIPTOR,LPDWORD);
|
|---|
| 146 | LONG WINAPI RegLoadKeyA(HKEY,LPCSTR,LPCSTR);
|
|---|
| 147 | LONG WINAPI RegLoadKeyW(HKEY,LPCWSTR,LPCWSTR);
|
|---|
| 148 | #define RegLoadKey WINELIB_NAME_AW(RegLoadKey)
|
|---|
| 149 | LONG WINAPI RegNotifyChangeKeyValue(HKEY,BOOL,DWORD,HANDLE,BOOL);
|
|---|
| 150 | LONG WINAPI RegOpenKeyExW(HKEY,LPCWSTR,DWORD,REGSAM,LPHKEY);
|
|---|
| 151 | LONG WINAPI RegOpenKeyExA(HKEY,LPCSTR,DWORD,REGSAM,LPHKEY);
|
|---|
| 152 | #define RegOpenKeyEx WINELIB_NAME_AW(RegOpenKeyEx)
|
|---|
| 153 | LONG WINAPI RegQueryInfoKeyW(HKEY,LPWSTR,LPDWORD,LPDWORD,LPDWORD,
|
|---|
| 154 | LPDWORD,LPDWORD,LPDWORD,LPDWORD,LPDWORD,
|
|---|
| 155 | LPDWORD,LPFILETIME);
|
|---|
| 156 | LONG WINAPI RegQueryInfoKeyA(HKEY,LPSTR,LPDWORD,LPDWORD,LPDWORD,
|
|---|
| 157 | LPDWORD,LPDWORD,LPDWORD,LPDWORD,LPDWORD,
|
|---|
| 158 | LPDWORD,LPFILETIME);
|
|---|
| 159 | #define RegQueryInfoKey WINELIB_NAME_AW(RegQueryInfoKey)
|
|---|
| 160 | LONG WINAPI RegReplaceKeyA(HKEY,LPCSTR,LPCSTR,LPCSTR);
|
|---|
| 161 | LONG WINAPI RegReplaceKeyW(HKEY,LPCWSTR,LPCWSTR,LPCWSTR);
|
|---|
| 162 | #define RegReplaceKey WINELIB_NAME_AW(RegReplaceKey)
|
|---|
| 163 | LONG WINAPI RegRestoreKeyA(HKEY,LPCSTR,DWORD);
|
|---|
| 164 | LONG WINAPI RegRestoreKeyW(HKEY,LPCWSTR,DWORD);
|
|---|
| 165 | #define RegRestoreKey WINELIB_NAME_AW(RegRestoreKey)
|
|---|
| 166 | LONG WINAPI RegUnLoadKeyA(HKEY,LPCSTR);
|
|---|
| 167 | LONG WINAPI RegUnLoadKeyW(HKEY,LPCWSTR);
|
|---|
| 168 | #define RegUnLoadKey WINELIB_NAME_AW(RegUnLoadKey)
|
|---|
| 169 | BOOL WINAPI SetFileSecurityA(LPCSTR,SECURITY_INFORMATION,PSECURITY_DESCRIPTOR);
|
|---|
| 170 | BOOL WINAPI SetFileSecurityW(LPCWSTR,SECURITY_INFORMATION,PSECURITY_DESCRIPTOR);
|
|---|
| 171 | #define SetFileSecurity WINELIB_NAME_AW(SetFileSecurity)
|
|---|
| 172 |
|
|---|
| 173 | /* Declarations for functions that are the same in Win16 and Win32 */
|
|---|
| 174 |
|
|---|
| 175 | LONG WINAPI RegCloseKey(HKEY);
|
|---|
| 176 | LONG WINAPI RegFlushKey(HKEY);
|
|---|
| 177 |
|
|---|
| 178 | LONG WINAPI RegCreateKeyA(HKEY,LPCSTR,LPHKEY);
|
|---|
| 179 | LONG WINAPI RegCreateKeyW(HKEY,LPCWSTR,LPHKEY);
|
|---|
| 180 | #define RegCreateKey WINELIB_NAME_AW(RegCreateKey)
|
|---|
| 181 | LONG WINAPI RegDeleteKeyA(HKEY,LPCSTR);
|
|---|
| 182 | LONG WINAPI RegDeleteKeyW(HKEY,LPWSTR);
|
|---|
| 183 | #define RegDeleteKey WINELIB_NAME_AW(RegDeleteKey)
|
|---|
| 184 | LONG WINAPI RegDeleteValueA(HKEY,LPSTR);
|
|---|
| 185 | LONG WINAPI RegDeleteValueW(HKEY,LPWSTR);
|
|---|
| 186 | #define RegDeleteValue WINELIB_NAME_AW(RegDeleteValue)
|
|---|
| 187 | LONG WINAPI RegEnumKeyA(HKEY,DWORD,LPSTR,DWORD);
|
|---|
| 188 | LONG WINAPI RegEnumKeyW(HKEY,DWORD,LPWSTR,DWORD);
|
|---|
| 189 | #define RegEnumKey WINELIB_NAME_AW(RegEnumKey)
|
|---|
| 190 | LONG WINAPI RegEnumValueA(HKEY,DWORD,LPSTR,LPDWORD,LPDWORD,LPDWORD,LPBYTE,LPDWORD);
|
|---|
| 191 | LONG WINAPI RegEnumValueW(HKEY,DWORD,LPWSTR,LPDWORD,LPDWORD,LPDWORD,LPBYTE,LPDWORD);
|
|---|
| 192 | #define RegEnumValue WINELIB_NAME_AW(RegEnumValue)
|
|---|
| 193 | LONG WINAPI RegOpenKeyA(HKEY,LPCSTR,LPHKEY);
|
|---|
| 194 | LONG WINAPI RegOpenKeyW(HKEY,LPCWSTR,LPHKEY);
|
|---|
| 195 | #define RegOpenKey WINELIB_NAME_AW(RegOpenKey)
|
|---|
| 196 | LONG WINAPI RegQueryValueA(HKEY,LPCSTR,LPSTR,LPLONG);
|
|---|
| 197 | LONG WINAPI RegQueryValueW(HKEY,LPCWSTR,LPWSTR,LPLONG);
|
|---|
| 198 | #define RegQueryValue WINELIB_NAME_AW(RegQueryValue)
|
|---|
| 199 | LONG WINAPI RegQueryValueExA(HKEY,LPSTR,LPDWORD,LPDWORD,LPBYTE,LPDWORD);
|
|---|
| 200 | LONG WINAPI RegQueryValueExW(HKEY,LPWSTR,LPDWORD,LPDWORD,LPBYTE,LPDWORD);
|
|---|
| 201 | #define RegQueryValueEx WINELIB_NAME_AW(RegQueryValueEx)
|
|---|
| 202 | LONG WINAPI RegSetValueA(HKEY,LPCSTR,DWORD,LPCSTR,DWORD);
|
|---|
| 203 | LONG WINAPI RegSetValueW(HKEY,LPCWSTR,DWORD,LPCWSTR,DWORD);
|
|---|
| 204 | #define RegSetValue WINELIB_NAME_AW(RegSetValue)
|
|---|
| 205 | LONG WINAPI RegSetValueExA(HKEY,LPSTR,DWORD,DWORD,LPBYTE,DWORD);
|
|---|
| 206 | LONG WINAPI RegSetValueExW(HKEY,LPWSTR,DWORD,DWORD,LPBYTE,DWORD);
|
|---|
| 207 | #define RegSetValueEx WINELIB_NAME_AW(RegSetValueEx)
|
|---|
| 208 |
|
|---|
| 209 | #endif /* __WINE_WINREG_H */
|
|---|