home *** CD-ROM | disk | FTP | other *** search
/ PC World 2000 November / PCWorld_2000-11_cd.bin / Software / Topware / devc40 / _SETUP.5 / Group3 / winreg.h < prev    next >
C/C++ Source or Header  |  1999-11-07  |  6KB  |  156 lines

  1. #ifndef _WINREG_H
  2. #define _WINREG_H
  3. #ifdef __cplusplus
  4. extern "C" {
  5. #endif
  6. #define HKEY_CLASSES_ROOT    ((HKEY)0x80000000)
  7. #define HKEY_CURRENT_USER    ((HKEY)0x80000001)
  8. #define HKEY_LOCAL_MACHINE    ((HKEY)0x80000002)
  9. #define HKEY_USERS    ((HKEY)0x80000003)
  10. #define HKEY_PERFORMANCE_DATA    ((HKEY)0x80000004)
  11. #define HKEY_CURRENT_CONFIG    ((HKEY)0x80000005)
  12. #define HKEY_DYN_DATA    ((HKEY)0x80000006)
  13. #define REG_OPTION_VOLATILE 1
  14. #define REG_OPTION_NON_VOLATILE 0
  15. #define REG_CREATED_NEW_KEY 1
  16. #define REG_OPENED_EXISTING_KEY 2
  17. #define REG_NONE 0
  18. #define REG_SZ 1
  19. #define REG_EXPAND_SZ 2
  20. #define REG_BINARY 3
  21. #define REG_DWORD 4
  22. #define REG_DWORD_BIG_ENDIAN 5
  23. #define REG_DWORD_LITTLE_ENDIAN 4
  24. #define REG_LINK 6
  25. #define REG_MULTI_SZ 7
  26. #define REG_RESOURCE_LIST 8
  27. #define REG_FULL_RESOURCE_DESCRIPTOR 9
  28. #define REG_RESOURCE_REQUIREMENTS_LIST 10
  29. #define REG_NOTIFY_CHANGE_NAME 1
  30. #define REG_NOTIFY_CHANGE_ATTRIBUTES 2
  31. #define REG_NOTIFY_CHANGE_LAST_SET 4
  32. #define REG_NOTIFY_CHANGE_SECURITY 8
  33.  
  34. #ifndef RC_INVOKED
  35. typedef ACCESS_MASK REGSAM;
  36. typedef struct value_entA {
  37.     LPSTR ve_valuename;
  38.     DWORD ve_valuelen;
  39.     DWORD ve_valueptr;
  40.     DWORD ve_type;
  41. } VALENTA,*PVALENTA;
  42. typedef struct value_entW {
  43.     LPWSTR ve_valuename;
  44.     DWORD ve_valuelen;
  45.     DWORD ve_valueptr;
  46.     DWORD ve_type;
  47. } VALENTW,*PVALENTW;
  48. BOOL WINAPI AbortSystemShutdownA(LPCSTR);
  49. BOOL WINAPI AbortSystemShutdownW(LPCWSTR);
  50. BOOL WINAPI InitiateSystemShutdownA(LPSTR,LPSTR,DWORD,BOOL,BOOL);
  51. BOOL WINAPI InitiateSystemShutdownW(LPWSTR,LPWSTR,DWORD,BOOL,BOOL);
  52. LONG WINAPI RegCloseKey(HKEY);
  53. LONG WINAPI RegConnectRegistryA(LPSTR,HKEY,PHKEY);
  54. LONG WINAPI RegConnectRegistryW(LPWSTR,HKEY,PHKEY);
  55. LONG WINAPI RegCreateKeyA(HKEY,LPCSTR,PHKEY);
  56. LONG WINAPI RegCreateKeyExA(HKEY,LPCSTR,DWORD,LPSTR,DWORD,REGSAM,LPSECURITY_ATTRIBUTES,PHKEY,PDWORD);
  57. LONG WINAPI RegCreateKeyExW(HKEY,LPCWSTR,DWORD,LPWSTR,DWORD,REGSAM,LPSECURITY_ATTRIBUTES,PHKEY,PDWORD);
  58. LONG WINAPI RegCreateKeyW(HKEY,LPCWSTR,PHKEY);
  59. LONG WINAPI RegDeleteKeyA(HKEY,LPCSTR);
  60. LONG WINAPI RegDeleteKeyW(HKEY,LPCWSTR);
  61. LONG WINAPI RegDeleteValueA (HKEY,LPCSTR);
  62. LONG WINAPI RegDeleteValueW(HKEY,LPCWSTR);
  63. LONG WINAPI RegEnumKeyA (HKEY,DWORD,LPSTR,DWORD);
  64. LONG WINAPI RegEnumKeyW(HKEY,DWORD,LPWSTR,DWORD);
  65. LONG WINAPI RegEnumKeyExA(HKEY,DWORD,LPSTR,PDWORD,PDWORD,LPSTR,PDWORD,PFILETIME);
  66. LONG WINAPI RegEnumKeyExW(HKEY,DWORD,LPWSTR,PDWORD,PDWORD,LPWSTR,PDWORD,PFILETIME);
  67. LONG WINAPI RegEnumValueA(HKEY,DWORD,LPSTR,PDWORD,PDWORD,PDWORD,LPBYTE,PDWORD);
  68. LONG WINAPI RegEnumValueW(HKEY,DWORD,LPWSTR,PDWORD,PDWORD,PDWORD,LPBYTE,PDWORD);
  69. LONG WINAPI RegFlushKey(HKEY);
  70. LONG WINAPI RegGetKeySecurity(HKEY,SECURITY_INFORMATION,PSECURITY_DESCRIPTOR,PDWORD);
  71. LONG WINAPI RegLoadKeyA(HKEY,LPCSTR,LPCSTR);
  72. LONG WINAPI RegLoadKeyW(HKEY,LPCWSTR,LPCWSTR);
  73. LONG WINAPI RegNotifyChangeKeyValue(HKEY,BOOL,DWORD,HANDLE,BOOL);
  74. LONG WINAPI RegOpenKeyA(HKEY,LPCSTR,PHKEY);
  75. LONG WINAPI RegOpenKeyExA(HKEY,LPCSTR,DWORD,REGSAM,PHKEY);
  76. LONG WINAPI RegOpenKeyExW(HKEY,LPCWSTR,DWORD,REGSAM,PHKEY);
  77. LONG WINAPI RegOpenKeyW(HKEY,LPCWSTR,PHKEY);
  78. LONG WINAPI RegQueryInfoKeyA(HKEY,LPSTR,PDWORD,PDWORD,PDWORD,PDWORD,PDWORD,PDWORD,PDWORD,PDWORD,PDWORD,PFILETIME);
  79. LONG WINAPI RegQueryInfoKeyW(HKEY,LPWSTR,PDWORD,PDWORD,PDWORD,PDWORD,PDWORD,PDWORD,PDWORD,PDWORD,PDWORD,PFILETIME);
  80. LONG WINAPI RegQueryMultipleValuesA(HKEY,PVALENTA,DWORD,LPSTR,PDWORD);
  81. LONG WINAPI RegQueryMultipleValuesW(HKEY,PVALENTW,DWORD,LPWSTR,PDWORD);
  82. LONG WINAPI RegQueryValueA(HKEY,LPCSTR,LPSTR,PLONG);
  83. LONG WINAPI RegQueryValueExA (HKEY,LPCSTR,PDWORD,PDWORD,LPBYTE,PDWORD);
  84. LONG WINAPI RegQueryValueExW(HKEY,LPCWSTR,PDWORD,PDWORD,LPBYTE,PDWORD);
  85. LONG WINAPI RegQueryValueW(HKEY,LPCWSTR,LPWSTR,PLONG);
  86. LONG WINAPI RegReplaceKeyA(HKEY,LPCSTR,LPCSTR,LPCSTR);
  87. LONG WINAPI RegReplaceKeyW(HKEY,LPCWSTR,LPCWSTR,LPCWSTR);
  88. LONG WINAPI RegRestoreKeyA (HKEY,LPCSTR,DWORD);
  89. LONG WINAPI RegRestoreKeyW(HKEY,LPCWSTR,DWORD);
  90. LONG WINAPI RegSaveKeyA(HKEY,LPCSTR,LPSECURITY_ATTRIBUTES);
  91. LONG WINAPI RegSaveKeyW(HKEY,LPCWSTR,LPSECURITY_ATTRIBUTES);
  92. LONG WINAPI RegSetKeySecurity(HKEY,SECURITY_INFORMATION,PSECURITY_DESCRIPTOR);
  93. LONG WINAPI RegSetValueA(HKEY,LPCSTR,DWORD,LPCSTR,DWORD);
  94. LONG WINAPI RegSetValueExA(HKEY,LPCSTR,DWORD,DWORD,const BYTE*,DWORD);
  95. LONG WINAPI RegSetValueExW(HKEY,LPCWSTR,DWORD,DWORD,const BYTE*,DWORD);
  96. LONG WINAPI RegSetValueW(HKEY,LPCWSTR,DWORD,LPCWSTR,DWORD);
  97. LONG WINAPI RegUnLoadKeyA(HKEY,LPCSTR);
  98. LONG WINAPI RegUnLoadKeyW(HKEY,LPCWSTR);
  99.  
  100. #ifdef UNICODE
  101. typedef VALENTW VALENT,*PVALENT;
  102. #define AbortSystemShutdown AbortSystemShutdownW
  103. #define InitiateSystemShutdown InitiateSystemShutdownW
  104. #define RegConnectRegistry RegConnectRegistryW
  105. #define RegCreateKey RegCreateKeyW
  106. #define RegCreateKeyEx RegCreateKeyExW
  107. #define RegDeleteKey RegDeleteKeyW
  108. #define RegDeleteValue RegDeleteValueW
  109. #define RegEnumKey RegEnumKeyW
  110. #define RegEnumKeyEx RegEnumKeyExW
  111. #define RegEnumValue RegEnumValueW
  112. #define RegLoadKey RegLoadKeyW
  113. #define RegOpenKey RegOpenKeyW
  114. #define RegOpenKeyEx RegOpenKeyExW
  115. #define RegQueryInfoKey RegQueryInfoKeyW
  116. #define RegQueryMultipleValues RegQueryMultipleValuesW
  117. #define RegQueryValue RegQueryValueW
  118. #define RegQueryValueEx RegQueryValueExW
  119. #define RegReplaceKey RegReplaceKeyW
  120. #define RegRestoreKey RegRestoreKeyW
  121. #define RegSaveKey RegSaveKeyW
  122. #define RegSetValue RegSetValueW
  123. #define RegSetValueEx RegSetValueExW
  124. #define RegUnLoadKey RegUnLoadKeyW
  125. #else
  126. typedef VALENTA VALENT,*PVALENT;
  127. #define AbortSystemShutdown AbortSystemShutdownA
  128. #define InitiateSystemShutdown InitiateSystemShutdownA
  129. #define RegConnectRegistry RegConnectRegistryA
  130. #define RegCreateKey RegCreateKeyA
  131. #define RegCreateKeyEx RegCreateKeyExA
  132. #define RegDeleteKey RegDeleteKeyA
  133. #define RegDeleteValue RegDeleteValueA
  134. #define RegEnumKey RegEnumKeyA
  135. #define RegEnumKeyEx RegEnumKeyExA
  136. #define RegEnumValue RegEnumValueA
  137. #define RegLoadKey RegLoadKeyA
  138. #define RegOpenKey RegOpenKeyA
  139. #define RegOpenKeyEx RegOpenKeyExA
  140. #define RegQueryInfoKey RegQueryInfoKeyA
  141. #define RegQueryMultipleValues RegQueryMultipleValuesA
  142. #define RegQueryValue RegQueryValueA
  143. #define RegQueryValueEx RegQueryValueExA
  144. #define RegReplaceKey RegReplaceKeyA
  145. #define RegRestoreKey RegRestoreKeyA
  146. #define RegSaveKey RegSaveKeyA
  147. #define RegSetValue RegSetValueA
  148. #define RegSetValueEx RegSetValueExA
  149. #define RegUnLoadKey RegUnLoadKeyA
  150. #endif
  151. #endif
  152. #ifdef __cplusplus
  153. }
  154. #endif
  155. #endif
  156.