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.

230 lines
3.9 KiB

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