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.

229 lines
6.6 KiB

  1. //
  2. // GLOBALS.H
  3. // Global Variable Decls
  4. //
  5. // Copyright(c) Microsoft 1997-
  6. //
  7. //
  8. // Debug stuff
  9. //
  10. #ifdef DEBUG
  11. DC_DATA_VAL ( char, g_szAssertionFailure[], "Assertion failure!" );
  12. DC_DATA_VAL ( char, g_szNewline[], "\n" );
  13. DC_DATA_ARRAY ( char, g_szDbgBuf, CCH_DEBUG_MAX );
  14. DC_DATA ( UINT, g_dbgRet );
  15. DC_DATA ( UINT, g_trcConfig );
  16. #endif // DEBUG
  17. //
  18. // DLL/Driver stuff
  19. //
  20. DC_DATA ( HINSTANCE, g_hInstAs16 );
  21. DC_DATA ( UINT, g_cProcesses );
  22. DC_DATA ( HTASK, g_hCoreTask );
  23. DC_DATA ( HINSTANCE, g_hInstKrnl16 );
  24. DC_DATA ( HMODULE, g_hModKrnl16 );
  25. DC_DATA ( DWORD, g_hInstKrnl32 );
  26. DC_DATA ( HINSTANCE, g_hInstKrnl32MappedTo16 );
  27. DC_DATA ( ANSITOUNIPROC, g_lpfnAnsiToUni );
  28. DC_DATA ( HINSTANCE, g_hInstGdi16 );
  29. DC_DATA ( HMODULE, g_hModGdi16 );
  30. DC_DATA ( DWORD, g_hInstGdi32 );
  31. DC_DATA ( REALPATBLTPROC, g_lpfnRealPatBlt );
  32. DC_DATA ( EXTTEXTOUTWPROC, g_lpfnExtTextOutW );
  33. DC_DATA ( TEXTOUTWPROC, g_lpfnTextOutW );
  34. DC_DATA ( POLYLINETOPROC, g_lpfnPolylineTo );
  35. DC_DATA ( POLYPOLYLINEPROC, g_lpfnPolyPolyline );
  36. DC_DATA ( HINSTANCE, g_hInstUser16 );
  37. DC_DATA ( HMODULE, g_hModUser16 );
  38. DC_DATA ( DWORD, g_hInstUser32 );
  39. DC_DATA ( GETWINDOWTHREADPROCESSIDPROC, g_lpfnGetWindowThreadProcessId );
  40. DC_DATA ( HDC, g_osiScreenDC );
  41. DC_DATA ( HDC, g_osiMemoryDC );
  42. DC_DATA ( HBITMAP, g_osiMemoryBMP );
  43. DC_DATA ( HBITMAP, g_osiMemoryOld );
  44. DC_DATA ( RECT, g_osiScreenRect );
  45. DC_DATA ( UINT, g_osiScreenBitsPlane );
  46. DC_DATA ( UINT, g_osiScreenPlanes );
  47. DC_DATA ( UINT, g_osiScreenBPP );
  48. DC_DATA ( DWORD, g_osiScreenRedMask );
  49. DC_DATA ( DWORD, g_osiScreenGreenMask );
  50. DC_DATA ( DWORD, g_osiScreenBlueMask );
  51. DC_DATA ( BITMAPINFO_ours, g_osiScreenBMI );
  52. DC_DATA ( HWND, g_osiDesktopWindow );
  53. //
  54. // Shared Memory
  55. //
  56. DC_DATA ( LPSHM_SHARED_MEMORY, g_asSharedMemory );
  57. DC_DATA_ARRAY ( LPOA_SHARED_DATA, g_poaData, 2 );
  58. //
  59. // Window/Task tracking
  60. //
  61. DC_DATA ( HWND, g_asMainWindow );
  62. DC_DATA ( ATOM, g_asHostProp );
  63. DC_DATA ( HHOOK, g_hetTrackHook );
  64. DC_DATA ( HHOOK, g_hetEventHook );
  65. DC_DATA ( BOOL, g_hetDDDesktopIsShared );
  66. //
  67. // Cursor Manager
  68. //
  69. DC_DATA ( LPCURSORSHAPE, g_cmMungedCursor ); // Holds <= color cursor bits
  70. DC_DATA ( LPBYTE, g_cmXformMono ); // 2x height, mono
  71. DC_DATA ( LPBYTE, g_cmXformColor ); // 2x height, color
  72. DC_DATA ( BOOL, g_cmXformOn );
  73. DC_DATA ( BOOL, g_cmCursorHidden );
  74. DC_DATA ( DWORD, g_cmNextCursorStamp );
  75. DC_DATA ( UINT, g_cxCursor );
  76. DC_DATA ( UINT, g_cyCursor );
  77. DC_DATA ( UINT, g_cmMonoByteSize );
  78. DC_DATA ( UINT, g_cmColorByteSize );
  79. DC_DATA ( SETCURSORPROC, g_lpfnSetCursor );
  80. DC_DATA ( FN_PATCH, g_cmSetCursorPatch );
  81. extern PALETTEENTRY CODESEG g_osiVgaPalette[16];
  82. //
  83. // Order Accumulator
  84. //
  85. DC_DATA ( UINT, g_oaFlow );
  86. DC_DATA_VAL ( BOOL, g_oaPurgeAllowed, TRUE);
  87. //
  88. // Order Encoder
  89. //
  90. DC_DATA ( BOOL, g_oeViewers );
  91. DC_DATA ( UINT, g_oeEnterCount );
  92. DC_DATA ( BOOL, g_oeSendOrders );
  93. DC_DATA ( BOOL, g_oeTextEnabled );
  94. DC_DATA_ARRAY ( BYTE, g_oeOrderSupported, ORD_NUM_INTERNAL_ORDERS );
  95. DC_DATA ( HPALETTE, g_oeStockPalette );
  96. DC_DATA ( TSHR_RECT32, g_oeLastETORect );
  97. //
  98. // Only valid within a single DDI call, saves stack space to use globals
  99. // NOTE:
  100. // We need at most 2 pointers to DCs, the source and dest. So we have
  101. // two allocated selectors.
  102. //
  103. DC_DATA ( OESTATE, g_oeState );
  104. DC_DATA ( UINT, g_oeSelDst );
  105. DC_DATA ( UINT, g_oeSelSrc );
  106. DC_DATA ( HWND, g_oeLastWindow );
  107. DC_DATA ( BOOL, g_oeLastWindowShared );
  108. DC_DATA ( BOOL, g_oeBaselineTextEnabled );
  109. DC_DATA ( UINT, g_oeFontCaps );
  110. //
  111. // Local font matching data - this is passed from the share core
  112. // NOTE: it's so large that we allocate it in 16-bit code
  113. //
  114. DC_DATA ( LPLOCALFONT, g_poeLocalFonts );
  115. DC_DATA_ARRAY( WORD, g_oeLocalFontIndex, FH_LOCAL_INDEX_SIZE );
  116. DC_DATA ( UINT, g_oeNumFonts );
  117. DC_DATA ( FH_CACHE, g_oeFhLast );
  118. DC_DATA_ARRAY ( char, g_oeAnsiString, ORD_MAX_STRING_LEN_WITHOUT_DELTAS+1 );
  119. DC_DATA_ARRAY ( WCHAR, g_oeTempString, ORD_MAX_STRING_LEN_WITHOUT_DELTAS+1 );
  120. DC_DATA_ARRAY ( FN_PATCH, g_oeDDPatches, DDI_MAX );
  121. DC_DATA ( FN_PATCH, g_oeDisplaySettingsPatch );
  122. DC_DATA ( FN_PATCH, g_oeDisplaySettingsExPatch );
  123. DC_DATA ( CDSEXPROC, g_lpfnCDSEx );
  124. //
  125. // Bounds Accumulation
  126. //
  127. DC_DATA ( UINT, g_baFirstRect );
  128. DC_DATA ( UINT, g_baLastRect );
  129. DC_DATA ( UINT, g_baRectsUsed );
  130. DC_DATA_ARRAY ( DD_BOUNDS, g_baBounds, BA_NUM_RECTS+1);
  131. //
  132. // A local copy of the bounding rectangles which the share core is
  133. // currently processing. These are used when accumulating orders which
  134. // rely on the contents of the destination.
  135. //
  136. DC_DATA ( UINT, g_baNumSpoilingRects);
  137. DC_DATA_ARRAY ( RECT, g_baSpoilingRects, BA_NUM_RECTS);
  138. //
  139. // Is the spoiling of existing orders when adding screen data allowed at
  140. // the moment, or temporarily disabled ? To do the spoiling, both
  141. // baSpoilByNewSDA and baSpoilByNewSDAEnabled must be TRUE.
  142. //
  143. DC_DATA_VAL ( BOOL, g_baSpoilByNewSDAEnabled, TRUE);
  144. //
  145. // Save Screenbits Interceptor
  146. //
  147. //
  148. // Remote status for SSB
  149. //
  150. DC_DATA ( REMOTE_SSB_STATE, g_ssiRemoteSSBState );
  151. //
  152. // Local status for SSB
  153. //
  154. DC_DATA ( LOCAL_SSB_STATE, g_ssiLocalSSBState );
  155. //
  156. // Current max for save screen bitmap size
  157. //
  158. DC_DATA ( DWORD, g_ssiSaveBitmapSize );
  159. DC_DATA ( SAVEBITSPROC, g_lpfnSaveBits );
  160. DC_DATA ( FN_PATCH, g_ssiSaveBitsPatch );
  161. DC_DATA ( HBITMAP, g_ssiLastSpbBitmap );
  162. //
  163. // IM stuff
  164. //
  165. //
  166. // NOTE:
  167. // Since we smart pagelock our data segment anyway, we don't need to
  168. // put g_imSharedData into a separate block of memory.
  169. //
  170. DC_DATA ( IM_SHARED_DATA, g_imSharedData );
  171. DC_DATA ( IM_WIN95_DATA, g_imWin95Data );
  172. DC_DATA_ARRAY ( FN_PATCH, g_imPatches, IM_MAX );
  173. DC_DATA ( int, g_imMouseDowns );