Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

217 lines
3.8 KiB

  1. /*++
  2. Copyright (c) 1995 Microsoft Corporation
  3. Module Name:
  4. registry.h
  5. Abstract:
  6. Prototypes, etc., for dll\registry.c
  7. Author:
  8. Richard L Firth (rfirth) 20-Mar-1995
  9. Revision History:
  10. 20-Mar-1995
  11. Created
  12. --*/
  13. #if defined(__cplusplus)
  14. extern "C" {
  15. #endif
  16. #define INTERNET_POLICY_KEY "SOFTWARE\\Policies\\Microsoft\\Windows\\CurrentVersion\\Internet Settings"
  17. //
  18. // prototypes
  19. //
  20. DWORD
  21. OpenInternetSettingsKey(
  22. VOID
  23. );
  24. DWORD
  25. CloseInternetSettingsKey(
  26. VOID
  27. );
  28. DWORD
  29. InternetDeleteRegistryValue(
  30. IN LPSTR ParameterName
  31. );
  32. DWORD
  33. InternetReadRegistryDword(
  34. IN LPCSTR ParameterName,
  35. OUT LPDWORD ParameterValue
  36. );
  37. DWORD
  38. InternetCacheReadRegistryDword(
  39. IN LPCSTR ParameterName,
  40. OUT LPDWORD ParameterValue
  41. );
  42. DWORD
  43. InternetWriteRegistryDword(
  44. IN LPCSTR ParameterName,
  45. IN DWORD ParameterValue
  46. );
  47. #ifdef WININET6
  48. DWORD
  49. InternetIDEReadRegistryDword(
  50. IN LPCSTR ParameterName,
  51. OUT LPDWORD ParameterValue
  52. );
  53. DWORD
  54. InternetIDEWriteRegistryDword(
  55. IN LPCSTR ParameterName,
  56. IN DWORD ParameterValue
  57. );
  58. #endif
  59. #define INTERNET_SETTINGS_KEY "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Internet Settings"
  60. DWORD
  61. InternetReadRegistryDwordKey(
  62. IN HKEY ParameterKey,
  63. IN LPCSTR ParameterName,
  64. OUT LPDWORD ParameterValue,
  65. IN LPCSTR keyToReadFrom = INTERNET_SETTINGS_KEY
  66. );
  67. DWORD
  68. InternetReadRegistryStringKey(
  69. IN HKEY ParameterKey,
  70. IN LPCSTR ParameterName,
  71. OUT LPSTR ParameterValue,
  72. IN OUT LPDWORD ParameterLength,
  73. IN LPCSTR keyToReadFrom = INTERNET_SETTINGS_KEY
  74. );
  75. DWORD
  76. InternetReadRegistryString(
  77. IN LPCSTR ParameterName,
  78. OUT LPSTR ParameterValue,
  79. IN OUT LPDWORD ParameterLength
  80. );
  81. DWORD
  82. ReadRegistryDword(
  83. IN HKEY Key,
  84. IN LPCSTR ParameterName,
  85. OUT LPDWORD ParameterValue
  86. );
  87. DWORD
  88. InternetWriteRegistryString(
  89. IN LPCSTR ParameterName,
  90. IN LPSTR ParameterValue
  91. );
  92. #if INET_DEBUG
  93. VOID
  94. DbgRegKey_Init(
  95. VOID
  96. );
  97. VOID
  98. DbgRegKey_Terminate(
  99. VOID
  100. );
  101. LONG
  102. DbgRegOpenKey(
  103. IN HKEY hKey,
  104. IN LPCTSTR lpszSubKey,
  105. OUT PHKEY phkResult,
  106. char * file,
  107. int line
  108. );
  109. LONG
  110. DbgRegOpenKeyEx(
  111. IN HKEY hKey,
  112. IN LPCSTR lpSubKey,
  113. IN DWORD ulOptions,
  114. IN REGSAM samDesired,
  115. OUT PHKEY phkResult,
  116. char * file,
  117. int line
  118. );
  119. LONG
  120. DbgRegCreateKeyEx(
  121. IN HKEY hKey,
  122. IN LPCSTR lpSubKey,
  123. IN DWORD Reserved,
  124. IN LPSTR lpClass,
  125. IN DWORD dwOptions,
  126. IN REGSAM samDesired,
  127. IN LPSECURITY_ATTRIBUTES lpSecurityAttributes,
  128. OUT PHKEY phkResult,
  129. OUT LPDWORD lpdwDisposition,
  130. char * file,
  131. int line
  132. );
  133. LONG
  134. DbgRegCloseKey(
  135. IN HKEY hKey
  136. );
  137. #define INITIALIZE_DEBUG_REGKEY() \
  138. DbgRegKey_Init()
  139. #define TERMINATE_DEBUG_REGKEY() \
  140. DbgRegKey_Terminate()
  141. #define REGOPENKEY(a, b, c) \
  142. DbgRegOpenKey((a), (b), (c), __FILE__, __LINE__)
  143. #define REGOPENKEYEX(a, b, c, d, e) \
  144. DbgRegOpenKeyEx((a), (b), (c), (d), (e), __FILE__, __LINE__)
  145. #define REGCREATEKEYEX(a, b, c, d, e, f, g, h, i) \
  146. DbgRegCreateKeyEx((a), (b), (c), (d), (e), (f), (g), (h), (i), __FILE__, __LINE__)
  147. #define REGCLOSEKEY(a) \
  148. DbgRegCloseKey(a)
  149. #else
  150. #define INITIALIZE_DEBUG_REGKEY() \
  151. /* NOTHING */
  152. #define TERMINATE_DEBUG_REGKEY() \
  153. /* NOTHING */
  154. #define REGOPENKEY(a, b, c) \
  155. RegOpenKey((a), (b), (c))
  156. #define REGOPENKEYEX(a, b, c, d, e) \
  157. RegOpenKeyEx((a), (b), (c), (d), (e))
  158. #define REGCREATEKEYEX(a, b, c, d, e, f, g, h, i) \
  159. RegCreateKeyEx((a), (b), (c), (d), (e), (f), (g), (h), (i))
  160. #define REGCLOSEKEY(a) \
  161. RegCloseKey(a)
  162. #endif // INET_DEBUG
  163. #if defined(__cplusplus)
  164. }
  165. #endif