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.

206 lines
6.9 KiB

  1. /****************************** Module Header ******************************\
  2. * Module Name: globals.h
  3. *
  4. * Copyright (c) 1985 - 1999, Microsoft Corporation
  5. *
  6. * This module contains all of USER.DLL's global variables. These are all
  7. * instance-specific, i.e. each client has his own copy of these. In general,
  8. * there shouldn't be much reason to create instance globals.
  9. *
  10. * History:
  11. * 10-18-90 DarrinM Created.
  12. \***************************************************************************/
  13. #ifndef _GLOBALS_
  14. #define _GLOBALS_
  15. #ifdef LAZY_CLASS_INIT
  16. extern BOOL gbClassesRegistered;
  17. #endif
  18. extern CONST ALWAYSZERO gZero;
  19. extern int gcWheelDelta;
  20. extern WORD gDispatchTableValues;
  21. extern WCHAR awchSlashStar[];
  22. extern CHAR achSlashStar[];
  23. extern PSERVERINFO gpsi;
  24. extern SHAREDINFO gSharedInfo;
  25. extern HMODULE hmodUser; // USER.DLL's hmodule
  26. extern ULONG_PTR gHighestUserAddress;
  27. extern BOOL gfServerProcess; // USER is linked on the CSR server side.
  28. extern BOOL gfSystemInitialized; // System has been initialized
  29. extern ACCESS_MASK gamWinSta; // ACCESS_MASK for the current WindowStation
  30. extern PVOID pUserHeap;
  31. extern CONST CFNSCSENDMESSAGE gapfnScSendMessage[];
  32. extern WCHAR szUSER32[];
  33. extern CONST WCHAR szNull[];
  34. extern CONST WCHAR szOneChar[];
  35. extern WCHAR szSLASHSTARDOTSTAR[];
  36. extern CONST BYTE mpTypeCcmd[];
  37. extern CONST BYTE mpTypeIich[];
  38. extern CONST UINT SEBbuttons[];
  39. extern CONST BYTE rgReturn[];
  40. extern ATOM atomMDIActivateProp;
  41. #ifdef LAME_BUTTON
  42. extern ATOM gatomLameButton;
  43. #endif
  44. extern ATOM gatomReaderMode;
  45. extern CRITICAL_SECTION gcsLookaside;
  46. extern CRITICAL_SECTION gcsHdc;
  47. extern CRITICAL_SECTION gcsClipboard;
  48. extern CRITICAL_SECTION gcsAccelCache;
  49. #ifdef _JANUS_
  50. extern BOOL gfEMIEnable;
  51. extern DWORD gdwEMIControl;
  52. extern BOOL gfDMREnable;
  53. extern HANDLE gEventSource;
  54. #endif
  55. extern HDC ghdcBits2;
  56. extern HDC ghdcGray;
  57. extern HFONT ghFontSys;
  58. extern HBRUSH ghbrWindowText;
  59. extern int gcxGray;
  60. extern int gcyGray;
  61. extern LPWSTR pwcHighContrastScheme;
  62. extern LPSTR pcHighContrastScheme;
  63. /*
  64. * LATER: client-side user needs to use moveable memory objects for
  65. * WOW compatibility (at least until/if/when we copy all the edit control
  66. * code into 16-bit space); that's also why we can't just party with
  67. * handles like LMHtoP does... -JeffPar
  68. */
  69. #ifndef RC_INVOKED // RC can't handle #pragmas
  70. #undef LHND
  71. #define LHND (LMEM_MOVEABLE | LMEM_ZEROINIT)
  72. #undef LMHtoP
  73. #define LMHtoP(handle) // Don't use this macro
  74. #endif
  75. /*
  76. * WOW HACK - apps can pass a global handle as the hInstance on a call
  77. * to CreateWindow for an edit control and expect allocations for the
  78. * control to come out of that global block. (MSJ 1/91 p.122)
  79. * WOW needs this hInstance during the LocalAlloc callback to set up
  80. * the DS for the LocalAlloc, so we pass hInstance as an 'extra' parameter.
  81. * !!! this is dependent on calling convention !!!
  82. * (SAS 6-18-92) added hack for all macros
  83. */
  84. #define LOCALALLOC(dwFlags, dwBytes, hInstance) \
  85. (*pfnLocalAlloc)(dwFlags, dwBytes, hInstance)
  86. #define LOCALREALLOC(hMem, dwBytes, dwFlags, hInstance, ppv) \
  87. (*pfnLocalReAlloc)(hMem, dwBytes, dwFlags, hInstance, ppv)
  88. #define LOCALLOCK(hMem, hInstance) \
  89. (*pfnLocalLock)(hMem, hInstance)
  90. #define LOCALUNLOCK(hMem, hInstance) \
  91. (*pfnLocalUnlock)(hMem, hInstance)
  92. #define LOCALSIZE(hMem, hInstance) \
  93. (*pfnLocalSize)(hMem, hInstance)
  94. #define LOCALFREE(hMem, hInstance) \
  95. (*pfnLocalFree)(hMem, hInstance)
  96. extern PFNFINDA pfnFindResourceExA;
  97. extern PFNFINDW pfnFindResourceExW;
  98. extern PFNLOAD pfnLoadResource;
  99. extern PFNLOCK pfnLockResource;
  100. extern PFNUNLOCK pfnUnlockResource;
  101. extern PFNFREE pfnFreeResource;
  102. extern PFNSIZEOF pfnSizeofResource;
  103. extern PFNLALLOC pfnLocalAlloc;
  104. extern PFNLREALLOC pfnLocalReAlloc;
  105. extern PFNLLOCK pfnLocalLock;
  106. extern PFNLUNLOCK pfnLocalUnlock;
  107. extern PFNLSIZE pfnLocalSize;
  108. extern PFNLFREE pfnLocalFree;
  109. extern PFNGETEXPWINVER pfnGetExpWinVer;
  110. extern PFN16GALLOC pfn16GlobalAlloc;
  111. extern PFN16GFREE pfn16GlobalFree;
  112. extern PFNGETMODFNAME pfnGetModFileName;
  113. extern PFNEMPTYCB pfnWowEmptyClipBoard;
  114. extern PFNWOWWNDPROCEX pfnWowWndProcEx;
  115. extern PFNWOWDLGPROCEX pfnWowDlgProcEx;
  116. extern PFNWOWEDITNEXTWORD pfnWowEditNextWord;
  117. extern PFNWOWCBSTOREHANDLE pfnWowCBStoreHandle;
  118. extern PFNGETPROCMODULE16 pfnWowGetProcModule;
  119. extern PFNWOWTELLWOWTHEHDLG pfnWOWTellWOWThehDlg;
  120. extern PFNWOWMSGBOXINDIRECTCALLBACK pfnWowMsgBoxIndirectCallback;
  121. extern PFNWOWILSTRCMP pfnWowIlstrcmp;
  122. extern PFNWOWTASK16SCHEDNOTIFY pfnWowTask16SchedNotify;
  123. extern UNICODE_STRING strRootDirectory;
  124. /*
  125. * UserApiHook
  126. */
  127. extern BYTE grgbDwpLiteHookMsg[(WM_USER + 7) / 8];
  128. extern BYTE grgbWndLiteHookMsg[(WM_USER + 7) / 8];
  129. extern BYTE grgbDlgLiteHookMsg[(WM_USER + 7) / 8];
  130. extern HMODULE ghmodUserApiHook; // the module containing the UserApiHook hooks
  131. extern USERAPIHOOK guah; // Dynamic function pointers
  132. extern BOOL gfUserApiHook; // Set TRUE if should use the UAH
  133. extern LONG gcCallUserApiHook; // reference count of ongoing calls to UserApiHook hooks
  134. extern LONG gcLoadUserApiHook; // reference count of UserApiHook module loads
  135. extern RTL_CRITICAL_SECTION gcsUserApiHook; // CS for UAH DLL load / unload
  136. extern INITUSERAPIHOOK gpfnInitUserApi; // UserApiHook callback
  137. #ifdef MESSAGE_PUMP_HOOK
  138. /*
  139. * MessagePumpHook
  140. */
  141. extern BOOL gfMessagePumpHook; // Set TRUE if should use the MPH
  142. extern LONG gcLoadMPH; // reference count of MPH Init
  143. extern MESSAGEPUMPHOOK gmph; // Dynamic function pointers
  144. extern RTL_CRITICAL_SECTION gcsMPH; // CS for MPH DLL load / unload
  145. extern INITMESSAGEPUMPHOOK gpfnInitMPH; // MessagePumpHook callback
  146. #endif
  147. /*
  148. * Menu Drag and Drop
  149. */
  150. extern HINSTANCE ghinstOLE;
  151. extern FARPROC gpfnOLEOleUninitialize;
  152. extern FARPROC gpfnOLERegisterDD;
  153. extern FARPROC gpfnOLERevokeDD;
  154. extern FARPROC gpfnOLEDoDD;
  155. /*
  156. * Accelerator table resources list.
  157. */
  158. extern PACCELCACHE gpac;
  159. /*
  160. * IME Window Handling.
  161. */
  162. extern DWORD gfConIme;
  163. #define UNKNOWN_CONIME ~0
  164. extern UNICODE_STRING strRootDirectory;
  165. extern BOOL gfLogonProcess;
  166. #if DBG
  167. extern USERDBGGLOBALS gDbgGlobals;
  168. #endif
  169. #endif