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.

196 lines
5.9 KiB

  1. /*++
  2. Copyright (c) 1999-2000 Microsoft Corporation
  3. Module Name:
  4. RemoteDesktopChannels.h
  5. Abstract:
  6. Remote Desktop Data Channel Messages and Defines
  7. Author:
  8. Tad Brockway 02/00
  9. Revision History:
  10. 4
  11. --*/
  12. #ifndef __REMOTEDESKTOPCHANNELS_H__
  13. #define __REMOTEDESKTOPCHANNELS_H__
  14. //
  15. // Turn off compiler padding of structures
  16. // and save previous packing style.
  17. //
  18. #pragma pack (push, t128pack, 1)
  19. //
  20. // Reserved Channel Names (Limit is REMOTEDESKTOP_RC_CHANNELNAMEMAX bytes)
  21. //
  22. #define REMOTEDESKTOP_RC_CONTROL_CHANNEL TEXT("RC_CTL")
  23. //
  24. // 64-bytes so aligned on WIN64
  25. //
  26. #define REMOTEDESKTOP_RC_CHANNELNAME_LENGTH 64
  27. //
  28. // Channel Buffer Header
  29. //
  30. // This data structure is at the top of all channel packets. Channel name
  31. // and message data immediately follow.
  32. //
  33. //TODO: Get rid of the magic number
  34. #define CHANNELBUF_MAGICNO 0x08854107
  35. typedef struct _RemoteDesktop_ChannelBufHeader {
  36. #ifdef USE_MAGICNO
  37. DWORD magicNo; // Buffer contents sanity checking
  38. // TODO: This can be removed, once debugged.
  39. #endif
  40. DWORD channelNameLen; // Length of channel name (in bytes) that immediately
  41. // follows the header.
  42. DWORD dataLen; // Length of data (in bytes) that follows the channel
  43. // name.
  44. #ifdef USE_MAGICNO
  45. DWORD padForWin64;
  46. #endif
  47. } REMOTEDESKTOP_CHANNELBUFHEADER, *PREMOTEDESKTOP_CHANNELBUFHEADER;
  48. //
  49. // Control Message Packet Header
  50. //
  51. typedef struct _REMOTEDESKTOP_CTL_PACKETHEADER
  52. {
  53. REMOTEDESKTOP_CHANNELBUFHEADER channelBufHeader;
  54. BYTE channelName[REMOTEDESKTOP_RC_CHANNELNAME_LENGTH];
  55. } REMOTEDESKTOP_CTL_PACKETHEADER, *PREMOTEDESKTOP_CTL_PACKETHEADER;
  56. //////////////////////////////////////////////////////////////////
  57. //
  58. // REMOTEDESKTOP_RC_CONTROL_CHANNEL Control Channel Messages
  59. //
  60. //
  61. // Control Channel Message Header
  62. //
  63. typedef struct _RemoteDesktopCtlBufHeader {
  64. DWORD msgType;
  65. } REMOTEDESKTOP_CTL_BUFHEADER, *PREMOTEDESKTOP_CTL_BUFHEADER;
  66. //
  67. // Message Type: REMOTEDESKTOP_CTL_REMOTE_CONTROL_DESKTOP
  68. // Direction: Client->Server
  69. // Summary: Desktop Remote Control Request
  70. // Message Data: BSTR Connection Parms
  71. // Returns: REMOTEDESKTOP_CTL_RESULT
  72. //
  73. #define REMOTEDESKTOP_CTL_REMOTE_CONTROL_DESKTOP 1
  74. typedef struct _RemoteDesktopRCCtlRequestPacket {
  75. REMOTEDESKTOP_CTL_PACKETHEADER packetHeader;
  76. REMOTEDESKTOP_CTL_BUFHEADER msgHeader;
  77. } REMOTEDESKTOP_RCCTL_REQUEST_PACKET, *PREMOTEDESKTOP_RCCTL_REQUEST_PACKET;
  78. //
  79. // Message Type: REMOTEDESKTOP_CTL_RESULT
  80. // Direction: Client->Server or Server->Client
  81. // Summary: Request Result in HRESULT Format.
  82. // Message Data: REMOTEDESKTOP_CTL_RESULT_PACKET
  83. // Returns: NA
  84. //
  85. // The result field is ERROR_SUCCESS is on success. Otherwise,
  86. // a Windows error code is returned.
  87. //
  88. #define REMOTEDESKTOP_CTL_RESULT 2
  89. typedef struct _RemoteDesktopCtlResultPacket {
  90. REMOTEDESKTOP_CTL_PACKETHEADER packetHeader;
  91. REMOTEDESKTOP_CTL_BUFHEADER msgHeader;
  92. LONG result; // SAFRemoteDesktopErrorCode
  93. } REMOTEDESKTOP_CTL_RESULT_PACKET, *PREMOTEDESKTOP_CTL_RESULT_PACKET;
  94. //
  95. // Message Type: REMOTEDESKTOP_CTL_AUTHENTICATE
  96. // Direction: Client->Server
  97. // Summary: Client Authentication Request
  98. // Message Data: BSTR Connection Parms
  99. // Returns: REMOTEDESKTOP_CTL_RESULT
  100. //
  101. #define REMOTEDESKTOP_CTL_AUTHENTICATE 3
  102. typedef struct _RemoteDesktopAuthenticatePacket {
  103. REMOTEDESKTOP_CTL_PACKETHEADER packetHeader;
  104. REMOTEDESKTOP_CTL_BUFHEADER msgHeader;
  105. } REMOTEDESKTOP_CTL_AUTHENTICATE_PACKET, *PREMOTEDESKTOP_CTL_AUTHENTICATE_PACKET;
  106. //
  107. // Message Type: REMOTEDESKTOP_CTL_SERVER_ANNOUNCE
  108. // Direction: Server->Client
  109. // Summary: Server Announce to Initiate Connect Sequence
  110. // Message Data: NONE
  111. // Returns: NONE
  112. //
  113. #define REMOTEDESKTOP_CTL_SERVER_ANNOUNCE 4
  114. typedef struct _RemoteDesktopCtlServerAnnouncePacket {
  115. REMOTEDESKTOP_CTL_PACKETHEADER packetHeader;
  116. REMOTEDESKTOP_CTL_BUFHEADER msgHeader;
  117. } REMOTEDESKTOP_CTL_SERVERANNOUNCE_PACKET, *PREMOTEDESKTOP_CTL_SERVERANNOUNCE_PACKET;
  118. //
  119. // Message Type: REMOTEDESKTOP_CTL_DISCONNECT
  120. // Direction: Server->Client
  121. // Summary: Disconnect Notification
  122. // Message Data: NONE
  123. // Returns: NONE
  124. //
  125. #define REMOTEDESKTOP_CTL_DISCONNECT 5
  126. typedef struct _RemoteDesktopCtlDisconnectPacket {
  127. REMOTEDESKTOP_CTL_PACKETHEADER packetHeader;
  128. REMOTEDESKTOP_CTL_BUFHEADER msgHeader;
  129. } REMOTEDESKTOP_CTL_DISCONNECT_PACKET, *PREMOTEDESKTOP_CTL_DISCONNECT_PACKET;
  130. //
  131. // Message Type: REMOTEDESKTOP_CTL_VERSIONINFO
  132. // Direction: Server->Client and Client->Server
  133. // Summary: Protocol Version Information
  134. // Message Data: NONE
  135. // Returns: NONE
  136. //
  137. #define REMOTEDESKTOP_CTL_VERSIONINFO 6
  138. typedef struct _RemoteDesktopVersionInfoPacket {
  139. REMOTEDESKTOP_CTL_PACKETHEADER packetHeader;
  140. REMOTEDESKTOP_CTL_BUFHEADER msgHeader;
  141. DWORD versionMajor;
  142. DWORD versionMinor;
  143. } REMOTEDESKTOP_CTL_VERSIONINFO_PACKET, *PREMOTEDESKTOP_CTL_VERSIONINFO_PACKET;
  144. //
  145. // Message Type: REMOTEDESKTOP_CTL_ISCONNECTED
  146. // Direction: Server->Client and Client->Server
  147. // Summary: Client/Server connection status
  148. // Message Data: NONE
  149. // Returns: NONE
  150. //
  151. #define REMOTEDESKTOP_CTL_ISCONNECTED 7
  152. typedef struct _RemoteDesktopIsConnected {
  153. REMOTEDESKTOP_CTL_PACKETHEADER packetHeader;
  154. REMOTEDESKTOP_CTL_BUFHEADER msgHeader;
  155. } REMOTEDESKTOP_CTL_ISCONNECTED_PACKET, *PREMOTEDESKTOP_CTL_ISCONNECTED_PACKET;
  156. //
  157. // Restore previous packing
  158. //
  159. #pragma pack (pop, t128pack)
  160. #endif