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.

316 lines
15 KiB

  1. /****************************************************************************/
  2. // nwdwioct.h
  3. //
  4. // Define formats for IOCtls sent ftom TShareDD to WDTShare
  5. //
  6. // Copyright(C) Microsoft Corporation 1997-1999
  7. /****************************************************************************/
  8. #include <tsrvexp.h>
  9. /****************************************************************************/
  10. /****************************************************************************/
  11. /* IOCtl codes - WDTShare IOCTLs start at 0x510: 0x500-0x50f are reserved */
  12. /* for use by PDMCS (see mcsioctl.h) */
  13. /****************************************************************************/
  14. /****************************************************************************/
  15. /****************************************************************************/
  16. /* IOCTL_WDTS_DD_CONNECT carries */
  17. /* - TSHARE_DD_CONNECT_IN as input data */
  18. /* - TSHARE_DD_CONNECT_OUT as output data */
  19. /****************************************************************************/
  20. #define IOCTL_WDTS_DD_CONNECT _ICA_CTL_CODE( 0x510, METHOD_NEITHER )
  21. /****************************************************************************/
  22. /* IOCTL_WDTS_DD_DISCONNECT carries */
  23. /* - TSHARE_DD_DISCONNECT_IN as input data */
  24. /* - NULL output data */
  25. /****************************************************************************/
  26. #define IOCTL_WDTS_DD_DISCONNECT _ICA_CTL_CODE( 0x511, METHOD_NEITHER )
  27. /****************************************************************************/
  28. /* IOCTL_WDTS_DD_RECONNECT carries */
  29. /* - TSHARE_DD_CONNECT_IN as input data */
  30. /* - TSHARE_DD_CONNECT_OUT as output data */
  31. /****************************************************************************/
  32. #define IOCTL_WDTS_DD_RECONNECT _ICA_CTL_CODE( 0x512, METHOD_NEITHER )
  33. /****************************************************************************/
  34. /* IOCTL_WDTS_DD_OUTPUT_AVAILABLE carries */
  35. /* - TSHARE_DD_OUTPUT_IN as input data */
  36. /* - TSHARE_DD_OUTPUT_OUT as output data */
  37. /****************************************************************************/
  38. #define IOCTL_WDTS_DD_OUTPUT_AVAILABLE \
  39. _ICA_CTL_CODE( 0x513, METHOD_NEITHER )
  40. /****************************************************************************/
  41. /* IOCTL_WDTS_DD_TIMER_INFO carries */
  42. /* - TSHARE_DD_TIMER_INFO as input data */
  43. /* - NULL output data */
  44. /****************************************************************************/
  45. #define IOCTL_WDTS_DD_TIMER_INFO _ICA_CTL_CODE( 0x514, METHOD_NEITHER )
  46. /****************************************************************************/
  47. /* IOCTL_WDTS_DD_CLIP carries */
  48. /* - CBM_EVENT_DATA as input data */
  49. /* - NULL output data */
  50. /****************************************************************************/
  51. #define IOCTL_WDTS_DD_CLIP _ICA_CTL_CODE( 0x515, METHOD_NEITHER )
  52. /****************************************************************************/
  53. /* IOCTL_WDTS_DD_SHADOW_CONNECT */
  54. /* - TSHARE_DD_CONNECT_IN as input data */
  55. /* - TSHARE_DD_CONNECT_OUT as output data */
  56. /****************************************************************************/
  57. #define IOCTL_WDTS_DD_SHADOW_CONNECT _ICA_CTL_CODE( 0x516, METHOD_NEITHER )
  58. /****************************************************************************/
  59. /* IOCTL_WDTS_DD_SHADOW_DISCONNECT */
  60. /* - TSHARE_DD_DISCONNECT_IN as input data */
  61. /* - NULL output data */
  62. /****************************************************************************/
  63. #define IOCTL_WDTS_DD_SHADOW_DISCONNECT _ICA_CTL_CODE( 0x517, METHOD_NEITHER )
  64. /****************************************************************************/
  65. /* IOCTL_WDTS_DD_SHADOW_SYNCHRONIZE */
  66. /* - TSHARE_DD_SHADOWSYNC_IN - as input data */
  67. /* - NULL output data */
  68. /****************************************************************************/
  69. #define IOCTL_WDTS_DD_SHADOW_SYNCHRONIZE _ICA_CTL_CODE( 0x518, METHOD_NEITHER )
  70. /****************************************************************************/
  71. /* IOCTL_WDTS_DD_REDRAW_SCREEN */
  72. /* - NULL input data */
  73. /* - NULL output data */
  74. /****************************************************************************/
  75. #define IOCTL_WDTS_DD_REDRAW_SCREEN _ICA_CTL_CODE( 0x519, METHOD_NEITHER )
  76. #ifdef DC_HICOLOR
  77. /****************************************************************************/
  78. /* IOCTL_WDTS_DD_QUERY_SHADOW_CAPS */
  79. /* - NULL input data */
  80. /* - Pointer to memory for shadow caps as output data */
  81. /****************************************************************************/
  82. #define IOCTL_WDTS_DD_QUERY_SHADOW_CAPS _ICA_CTL_CODE( 0x51A, METHOD_NEITHER )
  83. #endif
  84. /****************************************************************************/
  85. // IOCTL_WDTS_DD_GET_BITMAP_KEYDATABASE
  86. // - NULL input data
  87. // - Pointer to memory for keydatabase
  88. /****************************************************************************/
  89. #define IOCTL_WDTS_DD_GET_BITMAP_KEYDATABASE _ICA_CTL_CODE( 0x51B, METHOD_NEITHER )
  90. #ifdef DC_DEBUG
  91. /****************************************************************************/
  92. // IOCTL_WDTS_DD_ICABREAKONDEBUGGER
  93. // - NULL input data
  94. // - NULL output data
  95. /****************************************************************************/
  96. #define IOCTL_WDTS_DD_ICABREAKONDEBUGGER _ICA_CTL_CODE( 0x51C, METHOD_NEITHER )
  97. #endif
  98. /****************************************************************************/
  99. /****************************************************************************/
  100. /* IOCtl structures */
  101. /****************************************************************************/
  102. /****************************************************************************/
  103. /****************************************************************************/
  104. /* Structure: TSHARE_VIRTUAL_MODULE_DATA */
  105. /* */
  106. /* Description: Display Driver data for shadowing. This information is */
  107. /* passed to the DrvShadowConnect() entry point of the target session. */
  108. /****************************************************************************/
  109. typedef struct tagTSHARE_VIRTUAL_MODULE_DATA {
  110. //Combined capabilities for this client/host
  111. unsigned capsLength;
  112. TS_COMBINED_CAPABILITIES combinedCapabilities;
  113. } TSHARE_VIRTUAL_MODULE_DATA, *PTSHARE_VIRTUAL_MODULE_DATA;
  114. /****************************************************************************/
  115. /* Structure: TSHARE_DD_CONNECT_IN */
  116. /* */
  117. /* Description: Structure sent as input on IOCTL_WDTS_DD_(RE)CONNECT. */
  118. /* Contains data items, created by DD, that WD needs to get values of. */
  119. /****************************************************************************/
  120. typedef struct tagTSHARE_DD_CONNECT_IN
  121. {
  122. UINT32 pad1; /* Avoid Citrix bug */
  123. UINT32 pad2;
  124. UINT32 pad3;
  125. UINT32 pad4;
  126. PVOID pShm;
  127. unsigned DDShmSize; // Used for catching mismatched binaries.
  128. /************************************************************************/
  129. /* Following fields valid only on a reconnect */
  130. /************************************************************************/
  131. UINT32 desktopHeight;
  132. UINT32 desktopWidth;
  133. #ifdef DC_HICOLOR
  134. UINT32 desktopBpp;
  135. #endif
  136. PKTIMER pKickTimer;
  137. // The following fields are only used during shadow connect processing
  138. UINT32 virtModuleDataLen;
  139. PTSHARE_VIRTUAL_MODULE_DATA pVirtModuleData;
  140. } TSHARE_DD_CONNECT_IN, * PTSHARE_DD_CONNECT_IN;
  141. /****************************************************************************/
  142. /* Structure: TSHARE_DD_CONNECT_OUT */
  143. /* */
  144. /* Description: Structure returned by WD on IOCTL_WDTS_DD_(RE)CONNECT. */
  145. /* Contains data items, created by WD, that DD needs to get values of. */
  146. /****************************************************************************/
  147. typedef struct tagTSHARE_DD_CONNECT_OUT
  148. {
  149. UINT32 pad1; /* Avoid Citrix bug */
  150. UINT32 pad2;
  151. UINT32 pad3;
  152. UINT32 pad4;
  153. // WARNING! Never ever reference this field. It is for kernel debugger
  154. // use only. Pass any WD fields we need separately to avoid binary mismatch
  155. // problems.
  156. PVOID pTSWd;
  157. // System space - shared data structures
  158. PPROTOCOLSTATUS pProtocolStatus;
  159. /************************************************************************/
  160. /* Following two fields are meaningful only on reconnect */
  161. /************************************************************************/
  162. UINT32 desktopHeight;
  163. UINT32 desktopWidth;
  164. #ifdef DC_HICOLOR
  165. UINT32 desktopBpp;
  166. #endif
  167. // Individual stack connection status. The secondary is used to store the
  168. // status of the shadow stacks (if any).
  169. NTSTATUS primaryStatus;
  170. NTSTATUS secondaryStatus;
  171. // Cache keys for populating the bitmap caches.
  172. UINT32 bitmapKeyDatabaseSize;
  173. // This field needs to be qword aligned
  174. BYTE bitmapKeyDatabase;
  175. } TSHARE_DD_CONNECT_OUT, * PTSHARE_DD_CONNECT_OUT;
  176. /****************************************************************************/
  177. /* Structure: TSHARE_DD_DISCONNECT_IN */
  178. /* */
  179. /* Description: Structure sent as input on IOCTL_WDTS_DD_DISCONNECT. */
  180. /****************************************************************************/
  181. typedef struct tagTSHARE_DD_DISCONNECT_IN
  182. {
  183. UINT32 pad1; /* Avoid Citrix bug */
  184. UINT32 pad2;
  185. UINT32 pad3;
  186. UINT32 pad4;
  187. PVOID pShm;
  188. BOOL bShadowDisconnect; // TRUE if we are disconnecting to setup a shadow
  189. } TSHARE_DD_DISCONNECT_IN, * PTSHARE_DD_DISCONNECT_IN;
  190. /****************************************************************************/
  191. /* Structure: TSHARE_DD_OUTPUT_IN */
  192. /* */
  193. /* Description: Structure sent by DD as input on IOCTL_WDTS_DD_OUTPUT */
  194. /****************************************************************************/
  195. typedef struct tagTSHARE_DD_OUTPUT_IN
  196. {
  197. UINT32 pad1; /* Avoid Citrix bug */
  198. UINT32 pad2;
  199. UINT32 pad3;
  200. UINT32 pad4;
  201. PVOID pShm;
  202. BOOL forceSend; /* True if called due to explicit req. */
  203. PBYTE pFrameBuf; /* address of frame buffer */
  204. UINT32 frameBufWidth;
  205. UINT32 frameBufHeight;
  206. BOOL schedOnly; /* change sched state only - no send */
  207. } TSHARE_DD_OUTPUT_IN, * PTSHARE_DD_OUTPUT_IN;
  208. /****************************************************************************/
  209. /* Structure: TSHARE_DD_OUTPUT_OUT */
  210. /* */
  211. /* Description: Structure returned to DD on IOCTL_WDTS_DD_OUTPUT */
  212. /****************************************************************************/
  213. typedef struct tagTSHARE_DD_OUTPUT_OUT
  214. {
  215. UINT32 schCurrentMode;
  216. BOOL schInputKickMode;
  217. } TSHARE_DD_OUTPUT_OUT, * PTSHARE_DD_OUTPUT_OUT;
  218. /****************************************************************************/
  219. /* Structure: TSHARE_DD_TIMER_INFO */
  220. /* */
  221. /* Description: Structure sent by DD as input on IOCTL_WDTS_DD_TIMER_INFO. */
  222. /* Contains info required by WD to be able to start a timer which will pop */
  223. /* in the RIT of the correct WinStation. */
  224. /****************************************************************************/
  225. typedef struct tagTSHARE_DD_TIMER_INFO
  226. {
  227. UINT32 pad1; /* Avoid Citrix bug */
  228. UINT32 pad2;
  229. UINT32 pad3;
  230. UINT32 pad4;
  231. PKTIMER pKickTimer;
  232. } TSHARE_DD_TIMER_INFO, * PTSHARE_DD_TIMER_INFO;
  233. /****************************************************************************/
  234. /* Structure: TSHARE_DD_SHADOWSYNC_IN */
  235. /* */
  236. /* Description: Structure sent as input on IOCTL_WDTS_DD_SHADOW_SYNCHRONIZE */
  237. /* Contains data items, created by DD, that WD needs to get values of. */
  238. /****************************************************************************/
  239. typedef struct tagTSHARE_DD_SHADOWSYNC_IN
  240. {
  241. UINT32 pad1; /* Avoid Citrix bug */
  242. UINT32 pad2;
  243. UINT32 pad3;
  244. UINT32 pad4;
  245. PVOID pShm;
  246. #ifdef DC_HICOLOR
  247. UINT32 capsLen;
  248. PTS_COMBINED_CAPABILITIES pShadowCaps;
  249. #endif
  250. } TSHARE_DD_SHADOWSYNC_IN, * PTSHARE_DD_SHADOWSYNC_IN;
  251. /****************************************************************************/
  252. // Structure: TSHARE_DD_BITMAP_KEYDATABAE_OUT
  253. //
  254. // Description: Structure returned to DD on
  255. // IOCTL_WDTS_DD_GET_BITMAP_KEYDATABAE_OUT
  256. /****************************************************************************/
  257. typedef struct tagTSHARE_DD_BITMAP_KEYDATABASE_OUT
  258. {
  259. UINT32 bitmapKeyDatabaseSize;
  260. UINT32 pad;
  261. // This is QWORD aligned
  262. BYTE bitmapKeyDatabase;
  263. } TSHARE_DD_BITMAP_KEYDATABASE_OUT, * PTSHARE_DD_BITMAP_KEYDATABASE_OUT;