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.

205 lines
3.5 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. DWORD
  60. InternetReadRegistryDwordKey(
  61. IN HKEY ParameterKey,
  62. IN LPCSTR ParameterName,
  63. OUT LPDWORD ParameterValue
  64. );
  65. DWORD
  66. InternetReadRegistryString(
  67. IN LPCSTR ParameterName,
  68. OUT LPSTR ParameterValue,
  69. IN OUT LPDWORD ParameterLength
  70. );
  71. DWORD
  72. ReadRegistryDword(
  73. IN HKEY Key,
  74. IN LPCSTR ParameterName,
  75. OUT LPDWORD ParameterValue
  76. );
  77. DWORD
  78. InternetWriteRegistryString(
  79. IN LPCSTR ParameterName,
  80. IN LPSTR ParameterValue
  81. );
  82. #if INET_DEBUG
  83. VOID
  84. DbgRegKey_Init(
  85. VOID
  86. );
  87. VOID
  88. DbgRegKey_Terminate(
  89. VOID
  90. );
  91. LONG
  92. DbgRegOpenKey(
  93. IN HKEY hKey,
  94. IN LPCTSTR lpszSubKey,
  95. OUT PHKEY phkResult,
  96. char * file,
  97. int line
  98. );
  99. LONG
  100. DbgRegOpenKeyEx(
  101. IN HKEY hKey,
  102. IN LPCSTR lpSubKey,
  103. IN DWORD ulOptions,
  104. IN REGSAM samDesired,
  105. OUT PHKEY phkResult,
  106. char * file,
  107. int line
  108. );
  109. LONG
  110. DbgRegCreateKeyEx(
  111. IN HKEY hKey,
  112. IN LPCSTR lpSubKey,
  113. IN DWORD Reserved,
  114. IN LPSTR lpClass,
  115. IN DWORD dwOptions,
  116. IN REGSAM samDesired,
  117. IN LPSECURITY_ATTRIBUTES lpSecurityAttributes,
  118. OUT PHKEY phkResult,
  119. OUT LPDWORD lpdwDisposition,
  120. char * file,
  121. int line
  122. );
  123. LONG
  124. DbgRegCloseKey(
  125. IN HKEY hKey
  126. );
  127. #define INITIALIZE_DEBUG_REGKEY() \
  128. DbgRegKey_Init()
  129. #define TERMINATE_DEBUG_REGKEY() \
  130. DbgRegKey_Terminate()
  131. #define REGOPENKEY(a, b, c) \
  132. DbgRegOpenKey((a), (b), (c), __FILE__, __LINE__)
  133. #define REGOPENKEYEX(a, b, c, d, e) \
  134. DbgRegOpenKeyEx((a), (b), (c), (d), (e), __FILE__, __LINE__)
  135. #define REGCREATEKEYEX(a, b, c, d, e, f, g, h, i) \
  136. DbgRegCreateKeyEx((a), (b), (c), (d), (e), (f), (g), (h), (i), __FILE__, __LINE__)
  137. #define REGCLOSEKEY(a) \
  138. DbgRegCloseKey(a)
  139. #else
  140. #define INITIALIZE_DEBUG_REGKEY() \
  141. /* NOTHING */
  142. #define TERMINATE_DEBUG_REGKEY() \
  143. /* NOTHING */
  144. #define REGOPENKEY(a, b, c) \
  145. RegOpenKey((a), (b), (c))
  146. #define REGOPENKEYEX(a, b, c, d, e) \
  147. RegOpenKeyEx((a), (b), (c), (d), (e))
  148. #define REGCREATEKEYEX(a, b, c, d, e, f, g, h, i) \
  149. RegCreateKeyEx((a), (b), (c), (d), (e), (f), (g), (h), (i))
  150. #define REGCLOSEKEY(a) \
  151. RegCloseKey(a)
  152. #endif // INET_DEBUG
  153. #if defined(__cplusplus)
  154. }
  155. #endif