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.

246 lines
5.3 KiB

  1. /*++
  2. Copyright (c) 1995 Microsoft Corporation
  3. Module Name:
  4. globals.h
  5. Abstract:
  6. External definitions for data in dll\globals.c
  7. Author:
  8. Richard L Firth (rfirth) 15-Jul-1995
  9. Revision History:
  10. 15-Jul-1995 rfirth
  11. Created
  12. --*/
  13. #ifndef _GLOBALS_H_
  14. #define _GLOBALS_H_
  15. #if defined(__cplusplus)
  16. extern "C" {
  17. #endif
  18. //
  19. // macros
  20. //
  21. #define UPDATE_GLOBAL_PROXY_VERSION() \
  22. InterlockedIncrement((LPLONG)&GlobalProxyVersionCount)
  23. #define COOKIES_WARN 0 // warn with a dlg if using cookies
  24. #define COOKIES_ALLOW 1 // allow cookies without any warning
  25. #define COOKIES_DENY 2 // disable cookies completely
  26. //
  27. // external variables
  28. //
  29. extern HINSTANCE GlobalDllHandle;
  30. #define GlobalResHandle GlobalDllHandle // change for plugable ui
  31. extern DWORD GlobalPlatformType;
  32. extern DWORD GlobalPlatformVersion5;
  33. extern DWORD GlobalPlatformMillennium;
  34. extern BOOL GlobalDataInitialized;
  35. extern DWORD InternetMajorVersion;
  36. extern DWORD InternetMinorVersion;
  37. extern DWORD InternetBuildNumber;
  38. extern const DWORD GlobalResolveTimeout;
  39. extern const DWORD GlobalConnectTimeout;
  40. extern const DWORD GlobalConnectRetries;
  41. extern const DWORD GlobalSendTimeout;
  42. extern const DWORD GlobalReceiveTimeout;
  43. extern const DWORD GlobalFtpAcceptTimeout;
  44. extern const DWORD GlobalTransportPacketLength;
  45. extern const DWORD GlobalKeepAliveSocketTimeout;
  46. extern const DWORD GlobalSocketSendBufferLength;
  47. extern const DWORD GlobalSocketReceiveBufferLength;
  48. extern const DWORD GlobalMaxHttpRedirects;
  49. extern const DWORD GlobalMaxConnectionsPerServer;
  50. extern const DWORD GlobalMaxConnectionsPer1_0Server;
  51. extern const DWORD GlobalConnectionInactiveTimeout;
  52. extern const DWORD GlobalServerInfoTimeout;
  53. extern BOOL InDllCleanup;
  54. extern BOOL GlobalDynaUnload;
  55. extern BOOL GlobalDisableKeepAlive;
  56. extern const DWORD GlobalSecureProtocols;
  57. extern BOOL GlobalEnableHttp1_1;
  58. extern BOOL GlobalEnableProxyHttp1_1;
  59. extern BOOL GlobalDisableReadRange;
  60. extern BOOL GlobalIsProcessExplorer;
  61. extern const BOOL GlobalEnableFortezza;
  62. extern HANDLE g_hCompletionPort;
  63. extern LPOVERLAPPED g_lpCustomOverlapped;
  64. #define COMPLETION_BYTES_CUSTOM ((DWORD)-1)
  65. #define COMPLETION_BYTES_EXITIOCP ((DWORD)-2)
  66. #define WINHTTP_GLOBAL_IOCP_THREADS_BACKUP 2
  67. extern DWORD g_cNumIOCPThreads;
  68. #if INET_DEBUG
  69. extern LONG g_cWSACompletions;
  70. extern LONG g_cCustomCompletions;
  71. #endif
  72. extern LONG g_cSessionCount;
  73. class CAsyncCount
  74. {
  75. private:
  76. DWORD dwRef;
  77. public:
  78. CAsyncCount()
  79. {
  80. dwRef = 0;
  81. }
  82. DWORD AddRef();
  83. VOID Release();
  84. //make sure you grab the GeneralInitCritSec before making this call.
  85. DWORD GetRef()
  86. {
  87. return dwRef;
  88. }
  89. };
  90. extern CAsyncCount* g_pAsyncCount;
  91. extern const BOOL fDontUseDNSLoadBalancing;
  92. extern BOOL GlobalWarnOnPost;
  93. extern BOOL GlobalWarnAlways;
  94. extern LONG GlobalInternetOpenHandleCount;
  95. extern DWORD GlobalProxyVersionCount;
  96. extern BOOL GlobalAutoProxyInInit;
  97. extern BOOL GlobalAutoProxyCacheEnable;
  98. extern BOOL GlobalDisplayScriptDownloadFailureUI;
  99. extern SERIALIZED_LIST GlobalObjectList;
  100. extern LONGLONG dwdwHttpDefaultExpiryDelta;
  101. extern LONGLONG dwdwSessionStartTime;
  102. extern LONGLONG dwdwSessionStartTimeDefaultDelta;
  103. extern SECURITY_CACHE_LIST GlobalCertCache;
  104. extern BOOL GlobalDisableNTLMPreAuth;
  105. extern CCritSec AuthenticationCritSec;
  106. extern CCritSec GeneralInitCritSec;
  107. extern CCritSec LockRequestFileCritSec;
  108. extern CCritSec AutoProxyDllCritSec;
  109. extern CCritSec MlangCritSec;
  110. extern GLOBAL PP_CONTEXT GlobalPassportContext;
  111. extern const char vszSyncMode[];
  112. extern INTERNET_VERSION_INFO InternetVersionInfo;
  113. extern HTTP_VERSION_INFO HttpVersionInfo;
  114. extern BOOL fCdromDialogActive;
  115. //
  116. // The following globals are literal strings passed to winsock.
  117. // Do NOT make them const, otherwise they end up in .text section,
  118. // and web release of winsock2 has a bug where it locks and dirties
  119. // send buffers, confusing the win95 vmm and resulting in code
  120. // getting corrupted when it is paged back in. -RajeevD
  121. //
  122. extern char gszAt[];
  123. extern char gszBang[];
  124. extern char gszCRLF[3];
  125. //
  126. // novell client32 (hack) "support"
  127. //
  128. extern BOOL GlobalRunningNovellClient32;
  129. extern const BOOL GlobalNonBlockingClient32;
  130. // shfolder.dll hmod handle
  131. extern HMODULE g_HMODSHFolder;
  132. // shell32.dll hmod handle
  133. extern HMODULE g_HMODShell32;
  134. extern DWORD GlobalIdentity;
  135. extern GUID GlobalIdentityGuid;
  136. #ifdef WININET6
  137. extern HKEY GlobalCacheHKey;
  138. #endif
  139. //
  140. // prototypes
  141. //
  142. BOOL
  143. GlobalDllInitialize(
  144. VOID
  145. );
  146. VOID
  147. GlobalDllTerminate(
  148. VOID
  149. );
  150. DWORD
  151. GlobalDataInitialize(
  152. VOID
  153. );
  154. VOID
  155. GlobalDataTerminate(
  156. VOID
  157. );
  158. BOOL
  159. IsHttp1_1(
  160. VOID
  161. );
  162. VOID
  163. ChangeGlobalSettings(
  164. VOID
  165. );
  166. typedef HRESULT
  167. (STDAPICALLTYPE * PFNINETMULTIBYTETOUNICODE)
  168. (
  169. LPDWORD lpdword,
  170. DWORD dwSrcEncoding,
  171. LPCSTR lpSrcStr,
  172. LPINT lpnSrcSize,
  173. LPWSTR lpDstStr,
  174. LPINT lpDstStrSize
  175. );
  176. // Loads Mlang and returns a pointer to the MultiByte to Unicode converter.
  177. // Could return NULL if mlang.dll couldn't be loaded for some reason.
  178. PFNINETMULTIBYTETOUNICODE GetInetMultiByteToUnicode( );
  179. #if defined(__cplusplus)
  180. }
  181. #endif
  182. #endif //_GLOBALS_H_