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.

252 lines
4.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. #define INTERNET_SETTINGS_KEY "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Internet Settings"
  18. #define INTERNET_CACHE_SETTINGS_KEY "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Internet Settings\\5.0\\Cache"
  19. //
  20. // prototypes
  21. //
  22. VOID
  23. EnsureInternetSettingsKeyCached(
  24. VOID
  25. );
  26. DWORD
  27. CloseInternetSettingsKey(
  28. VOID
  29. );
  30. DWORD
  31. GetMyEmailName(
  32. OUT LPSTR EmailName,
  33. IN OUT LPDWORD Length
  34. );
  35. DWORD
  36. GetMyDomainName(
  37. OUT LPSTR DomainName,
  38. IN OUT LPDWORD Length
  39. );
  40. BOOL
  41. GetFileExtensionFromMimeType(
  42. IN LPCSTR lpszMimeType,
  43. IN DWORD dwMimeLen,
  44. IN LPSTR lpszFileExtension,
  45. IN OUT LPDWORD lpdwLen
  46. );
  47. //DWORD
  48. //InternetGetComputerName(
  49. // OUT LPSTR Buffer,
  50. // IN OUT LPDWORD Length
  51. // );
  52. DWORD
  53. InternetDeleteRegistryValue(
  54. IN LPSTR ParameterName
  55. );
  56. DWORD
  57. InternetReadRegistryDword(
  58. IN LPCSTR ParameterName,
  59. OUT LPDWORD ParameterValue
  60. );
  61. DWORD
  62. InternetCacheReadRegistryDword(
  63. IN LPCSTR ParameterName,
  64. OUT LPDWORD ParameterValue
  65. );
  66. DWORD
  67. InternetWriteRegistryDword(
  68. IN LPCSTR ParameterName,
  69. IN DWORD ParameterValue
  70. );
  71. #ifdef WININET6
  72. DWORD
  73. InternetIDEReadRegistryDword(
  74. IN LPCSTR ParameterName,
  75. OUT LPDWORD ParameterValue
  76. );
  77. DWORD
  78. InternetIDEWriteRegistryDword(
  79. IN LPCSTR ParameterName,
  80. IN DWORD ParameterValue
  81. );
  82. #endif
  83. DWORD
  84. InternetReadRegistryDwordKey(
  85. IN HKEY ParameterKey,
  86. IN LPCSTR ParameterName,
  87. OUT LPDWORD ParameterValue
  88. );
  89. DWORD
  90. InternetReadRegistryString(
  91. IN LPCSTR ParameterName,
  92. OUT LPSTR ParameterValue,
  93. IN OUT LPDWORD ParameterLength
  94. );
  95. DWORD
  96. ReadRegistryDword(
  97. IN HKEY Key,
  98. IN LPCSTR ParameterName,
  99. OUT LPDWORD ParameterValue
  100. );
  101. DWORD
  102. InternetWriteRegistryString(
  103. IN LPCSTR ParameterName,
  104. IN LPSTR ParameterValue
  105. );
  106. //DWORD
  107. //InternetReadRegistryBinary(
  108. // IN LPCSTR ParameterName,
  109. // OUT LPBYTE ParameterValue,
  110. // IN OUT LPDWORD ParameterLength
  111. // );
  112. DWORD
  113. CreateMimeExclusionTableForCache(VOID);
  114. DWORD
  115. CreateHeaderExclusionTableForCache(VOID);
  116. VOID
  117. DestroyMimeExclusionTableForCache(VOID);
  118. VOID
  119. DestroyHeaderExclusionTableForCache(VOID);
  120. #if INET_DEBUG
  121. VOID
  122. DbgRegKey_Init(
  123. VOID
  124. );
  125. VOID
  126. DbgRegKey_Terminate(
  127. VOID
  128. );
  129. LONG
  130. DbgRegOpenKey(
  131. IN HKEY hKey,
  132. IN LPCTSTR lpszSubKey,
  133. OUT PHKEY phkResult,
  134. char * file,
  135. int line
  136. );
  137. LONG
  138. DbgRegOpenKeyEx(
  139. IN HKEY hKey,
  140. IN LPCSTR lpSubKey,
  141. IN DWORD ulOptions,
  142. IN REGSAM samDesired,
  143. OUT PHKEY phkResult,
  144. char * file,
  145. int line
  146. );
  147. LONG
  148. DbgRegCreateKeyEx(
  149. IN HKEY hKey,
  150. IN LPCSTR lpSubKey,
  151. IN DWORD Reserved,
  152. IN LPSTR lpClass,
  153. IN DWORD dwOptions,
  154. IN REGSAM samDesired,
  155. IN LPSECURITY_ATTRIBUTES lpSecurityAttributes,
  156. OUT PHKEY phkResult,
  157. OUT LPDWORD lpdwDisposition,
  158. char * file,
  159. int line
  160. );
  161. LONG
  162. DbgRegCloseKey(
  163. IN HKEY hKey
  164. );
  165. #define INITIALIZE_DEBUG_REGKEY() \
  166. DbgRegKey_Init()
  167. #define TERMINATE_DEBUG_REGKEY() \
  168. DbgRegKey_Terminate()
  169. #define REGOPENKEY(a, b, c) \
  170. DbgRegOpenKey((a), (b), (c), __FILE__, __LINE__)
  171. #define REGOPENKEYEX(a, b, c, d, e) \
  172. DbgRegOpenKeyEx((a), (b), (c), (d), (e), __FILE__, __LINE__)
  173. #define REGCREATEKEYEX(a, b, c, d, e, f, g, h, i) \
  174. DbgRegCreateKeyEx((a), (b), (c), (d), (e), (f), (g), (h), (i), __FILE__, __LINE__)
  175. #define REGCLOSEKEY(a) \
  176. DbgRegCloseKey(a)
  177. #else
  178. #define INITIALIZE_DEBUG_REGKEY() \
  179. /* NOTHING */
  180. #define TERMINATE_DEBUG_REGKEY() \
  181. /* NOTHING */
  182. #define REGOPENKEY(a, b, c) \
  183. RegOpenKey((a), (b), (c))
  184. #define REGOPENKEYEX(a, b, c, d, e) \
  185. RegOpenKeyEx((a), (b), (c), (d), (e))
  186. #define REGCREATEKEYEX(a, b, c, d, e, f, g, h, i) \
  187. RegCreateKeyEx((a), (b), (c), (d), (e), (f), (g), (h), (i))
  188. #define REGCLOSEKEY(a) \
  189. RegCloseKey(a)
  190. #endif // INET_DEBUG
  191. #if defined(__cplusplus)
  192. }
  193. #endif