winreg.h 7.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164
  1. /*
  2. * Win32 registry defines (see also winnt.h)
  3. *
  4. * Copyright (C) the Wine project
  5. *
  6. * This library is free software; you can redistribute it and/or
  7. * modify it under the terms of the GNU Lesser General Public
  8. * License as published by the Free Software Foundation; either
  9. * version 2.1 of the License, or (at your option) any later version.
  10. *
  11. * This library is distributed in the hope that it will be useful,
  12. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  14. * Lesser General Public License for more details.
  15. *
  16. * You should have received a copy of the GNU Lesser General Public
  17. * License along with this library; if not, write to the Free Software
  18. * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  19. */
  20. #ifndef __WINE_WINREG_H
  21. #define __WINE_WINREG_H
  22. #ifdef __cplusplus
  23. extern "C" {
  24. #endif /* defined(__cplusplus) */
  25. #define HKEY_CLASSES_ROOT ((HKEY) 0x80000000)
  26. #define HKEY_CURRENT_USER ((HKEY) 0x80000001)
  27. #define HKEY_LOCAL_MACHINE ((HKEY) 0x80000002)
  28. #define HKEY_USERS ((HKEY) 0x80000003)
  29. #define HKEY_PERFORMANCE_DATA ((HKEY) 0x80000004)
  30. #define HKEY_CURRENT_CONFIG ((HKEY) 0x80000005)
  31. #define HKEY_DYN_DATA ((HKEY) 0x80000006)
  32. /*
  33. * registry provider structs
  34. */
  35. typedef struct value_entA
  36. { LPSTR ve_valuename;
  37. DWORD ve_valuelen;
  38. DWORD_PTR ve_valueptr;
  39. DWORD ve_type;
  40. } VALENTA, *PVALENTA;
  41. typedef struct value_entW {
  42. LPWSTR ve_valuename;
  43. DWORD ve_valuelen;
  44. DWORD_PTR ve_valueptr;
  45. DWORD ve_type;
  46. } VALENTW, *PVALENTW;
  47. typedef ACCESS_MASK REGSAM;
  48. /*
  49. * InitiateSystemShutdown() reasons
  50. */
  51. #include <reason.h>
  52. #define REASON_OTHER (SHTDN_REASON_MAJOR_OTHER | SHTDN_REASON_MINOR_OTHER)
  53. #define REASON_UNKNOWN SHTDN_REASON_UNKNOWN
  54. #define REASON_LEGACY_API SHTDN_REASON_LEGACY_API
  55. #define REASON_PLANNED_FLAG SHTDN_REASON_FLAG_PLANNED
  56. #define MAX_SHUTDOWN_TIMEOUT (10*365*24*60*60)
  57. BOOL WINAPI AbortSystemShutdownA(LPSTR);
  58. BOOL WINAPI AbortSystemShutdownW(LPWSTR);
  59. #define AbortSystemShutdown WINELIB_NAME_AW(AbortSystemShutdown)
  60. BOOL WINAPI InitiateSystemShutdownA(LPSTR,LPSTR,DWORD,BOOL,BOOL);
  61. BOOL WINAPI InitiateSystemShutdownW(LPWSTR,LPWSTR,DWORD,BOOL,BOOL);
  62. #define InitiateSystemShutdown WINELIB_NAME_AW(InitiateSystemShutdown);
  63. BOOL WINAPI InitiateSystemShutdownExA(LPSTR,LPSTR,DWORD,BOOL,BOOL,DWORD);
  64. BOOL WINAPI InitiateSystemShutdownExW(LPWSTR,LPWSTR,DWORD,BOOL,BOOL,DWORD);
  65. #define InitiateSystemShutdownEx WINELIB_NAME_AW(InitiateSystemShutdownEx);
  66. DWORD WINAPI RegCreateKeyExA(HKEY,LPCSTR,DWORD,LPCSTR,DWORD,REGSAM,
  67. LPSECURITY_ATTRIBUTES,PHKEY,LPDWORD);
  68. DWORD WINAPI RegCreateKeyExW(HKEY,LPCWSTR,DWORD,LPCWSTR,DWORD,REGSAM,
  69. LPSECURITY_ATTRIBUTES,PHKEY,LPDWORD);
  70. #define RegCreateKeyEx WINELIB_NAME_AW(RegCreateKeyEx)
  71. LONG WINAPI RegSaveKeyA(HKEY,LPCSTR,LPSECURITY_ATTRIBUTES);
  72. LONG WINAPI RegSaveKeyW(HKEY,LPCWSTR,LPSECURITY_ATTRIBUTES);
  73. #define RegSaveKey WINELIB_NAME_AW(RegSaveKey)
  74. LONG WINAPI RegSetKeySecurity(HKEY,SECURITY_INFORMATION,PSECURITY_DESCRIPTOR);
  75. LONG WINAPI RegConnectRegistryA(LPCSTR,HKEY,PHKEY);
  76. LONG WINAPI RegConnectRegistryW(LPCWSTR,HKEY,PHKEY);
  77. #define RegConnectRegistry WINELIB_NAME_AW(RegConnectRegistry)
  78. DWORD WINAPI RegEnumKeyExA(HKEY,DWORD,LPSTR,LPDWORD,LPDWORD,LPSTR,
  79. LPDWORD,LPFILETIME);
  80. DWORD WINAPI RegEnumKeyExW(HKEY,DWORD,LPWSTR,LPDWORD,LPDWORD,LPWSTR,
  81. LPDWORD,LPFILETIME);
  82. #define RegEnumKeyEx WINELIB_NAME_AW(RegEnumKeyEx)
  83. LONG WINAPI RegGetKeySecurity(HKEY,SECURITY_INFORMATION,PSECURITY_DESCRIPTOR,LPDWORD);
  84. LONG WINAPI RegLoadKeyA(HKEY,LPCSTR,LPCSTR);
  85. LONG WINAPI RegLoadKeyW(HKEY,LPCWSTR,LPCWSTR);
  86. #define RegLoadKey WINELIB_NAME_AW(RegLoadKey)
  87. LONG WINAPI RegNotifyChangeKeyValue(HKEY,BOOL,DWORD,HANDLE,BOOL);
  88. DWORD WINAPI RegOpenCurrentUser(REGSAM,PHKEY);
  89. DWORD WINAPI RegOpenKeyExW(HKEY,LPCWSTR,DWORD,REGSAM,PHKEY);
  90. DWORD WINAPI RegOpenKeyExA(HKEY,LPCSTR,DWORD,REGSAM,PHKEY);
  91. #define RegOpenKeyEx WINELIB_NAME_AW(RegOpenKeyEx)
  92. DWORD WINAPI RegQueryInfoKeyW(HKEY,LPWSTR,LPDWORD,LPDWORD,LPDWORD,
  93. LPDWORD,LPDWORD,LPDWORD,LPDWORD,LPDWORD,
  94. LPDWORD,LPFILETIME);
  95. DWORD WINAPI RegQueryInfoKeyA(HKEY,LPSTR,LPDWORD,LPDWORD,LPDWORD,
  96. LPDWORD,LPDWORD,LPDWORD,LPDWORD,LPDWORD,
  97. LPDWORD,LPFILETIME);
  98. #define RegQueryInfoKey WINELIB_NAME_AW(RegQueryInfoKey)
  99. DWORD WINAPI RegQueryMultipleValuesA(HKEY,PVALENTA,DWORD,LPSTR,LPDWORD);
  100. DWORD WINAPI RegQueryMultipleValuesW(HKEY,PVALENTW,DWORD,LPWSTR,LPDWORD);
  101. #define RegQueryMultipleValues WINELIB_NAME_AW(RegQueryMultipleValues)
  102. LONG WINAPI RegReplaceKeyA(HKEY,LPCSTR,LPCSTR,LPCSTR);
  103. LONG WINAPI RegReplaceKeyW(HKEY,LPCWSTR,LPCWSTR,LPCWSTR);
  104. #define RegReplaceKey WINELIB_NAME_AW(RegReplaceKey)
  105. LONG WINAPI RegRestoreKeyA(HKEY,LPCSTR,DWORD);
  106. LONG WINAPI RegRestoreKeyW(HKEY,LPCWSTR,DWORD);
  107. #define RegRestoreKey WINELIB_NAME_AW(RegRestoreKey)
  108. LONG WINAPI RegUnLoadKeyA(HKEY,LPCSTR);
  109. LONG WINAPI RegUnLoadKeyW(HKEY,LPCWSTR);
  110. #define RegUnLoadKey WINELIB_NAME_AW(RegUnLoadKey)
  111. /* Declarations for functions that are the same in Win16 and Win32 */
  112. DWORD WINAPI RegCloseKey(HKEY);
  113. DWORD WINAPI RegFlushKey(HKEY);
  114. DWORD WINAPI RegCreateKeyA(HKEY,LPCSTR,PHKEY);
  115. DWORD WINAPI RegCreateKeyW(HKEY,LPCWSTR,PHKEY);
  116. #define RegCreateKey WINELIB_NAME_AW(RegCreateKey)
  117. DWORD WINAPI RegDeleteKeyA(HKEY,LPCSTR);
  118. DWORD WINAPI RegDeleteKeyW(HKEY,LPCWSTR);
  119. #define RegDeleteKey WINELIB_NAME_AW(RegDeleteKey)
  120. DWORD WINAPI RegDeleteValueA(HKEY,LPCSTR);
  121. DWORD WINAPI RegDeleteValueW(HKEY,LPCWSTR);
  122. #define RegDeleteValue WINELIB_NAME_AW(RegDeleteValue)
  123. DWORD WINAPI RegEnumKeyA(HKEY,DWORD,LPSTR,DWORD);
  124. DWORD WINAPI RegEnumKeyW(HKEY,DWORD,LPWSTR,DWORD);
  125. #define RegEnumKey WINELIB_NAME_AW(RegEnumKey)
  126. DWORD WINAPI RegEnumValueA(HKEY,DWORD,LPSTR,LPDWORD,LPDWORD,LPDWORD,LPBYTE,LPDWORD);
  127. DWORD WINAPI RegEnumValueW(HKEY,DWORD,LPWSTR,LPDWORD,LPDWORD,LPDWORD,LPBYTE,LPDWORD);
  128. #define RegEnumValue WINELIB_NAME_AW(RegEnumValue)
  129. DWORD WINAPI RegOpenKeyA(HKEY,LPCSTR,PHKEY);
  130. DWORD WINAPI RegOpenKeyW(HKEY,LPCWSTR,PHKEY);
  131. #define RegOpenKey WINELIB_NAME_AW(RegOpenKey)
  132. DWORD WINAPI RegQueryValueA(HKEY,LPCSTR,LPSTR,LPLONG);
  133. DWORD WINAPI RegQueryValueW(HKEY,LPCWSTR,LPWSTR,LPLONG);
  134. #define RegQueryValue WINELIB_NAME_AW(RegQueryValue)
  135. DWORD WINAPI RegQueryValueExA(HKEY,LPCSTR,LPDWORD,LPDWORD,LPBYTE,LPDWORD);
  136. DWORD WINAPI RegQueryValueExW(HKEY,LPCWSTR,LPDWORD,LPDWORD,LPBYTE,LPDWORD);
  137. #define RegQueryValueEx WINELIB_NAME_AW(RegQueryValueEx)
  138. DWORD WINAPI RegSetValueA(HKEY,LPCSTR,DWORD,LPCSTR,DWORD);
  139. DWORD WINAPI RegSetValueW(HKEY,LPCWSTR,DWORD,LPCWSTR,DWORD);
  140. #define RegSetValue WINELIB_NAME_AW(RegSetValue)
  141. DWORD WINAPI RegSetValueExA(HKEY,LPCSTR,DWORD,DWORD,CONST BYTE*,DWORD);
  142. DWORD WINAPI RegSetValueExW(HKEY,LPCWSTR,DWORD,DWORD,CONST BYTE*,DWORD);
  143. #define RegSetValueEx WINELIB_NAME_AW(RegSetValueEx)
  144. #ifdef __cplusplus
  145. } /* extern "C" */
  146. #endif /* defined(__cplusplus) */
  147. #endif /* __WINE_WINREG_H */