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.

158 lines
7.4 KiB

  1. /****************************************************************************/
  2. // nwdwint.h
  3. //
  4. // General RDPWD header.
  5. //
  6. // Copyright (C) 1997-2000 Microsoft Corporation
  7. /****************************************************************************/
  8. #ifndef _H_NWDWINT
  9. #define _H_NWDWINT
  10. #include <t120.h>
  11. #include <tsrvexp.h>
  12. #include <nshmapi.h>
  13. #define MIN_USERDATAINFO_SIZE (sizeof(USERDATAINFO) \
  14. + sizeof(RNS_UD_CS_SEC) \
  15. + sizeof(CLIENT_H221_KEY))
  16. #ifdef DC_DEBUG
  17. #define WDW_CHECK_SHM(pShm) \
  18. TRC_ASSERT((((PSHM_SHARED_MEMORY)pShm)->guardVal1 == SHM_CHECKVAL), \
  19. (TB, "Guard value 1 incorrect(%#x) pShm(%p)", \
  20. ((PSHM_SHARED_MEMORY)pShm)->guardVal1, pShm)); \
  21. \
  22. TRC_ASSERT((((PSHM_SHARED_MEMORY)pShm)->guardVal2 == SHM_CHECKVAL), \
  23. (TB, "Guard value 2 incorrect(%#x) pShm(%p)", \
  24. ((PSHM_SHARED_MEMORY)pShm)->guardVal2, pShm)); \
  25. \
  26. TRC_ASSERT((((PSHM_SHARED_MEMORY)pShm)->guardVal3 == SHM_CHECKVAL), \
  27. (TB, "Guard value 3 incorrect(%#x) pShm(%p)", \
  28. ((PSHM_SHARED_MEMORY)pShm)->guardVal3, pShm)); \
  29. \
  30. TRC_ASSERT((((PSHM_SHARED_MEMORY)pShm)->guardVal4 == SHM_CHECKVAL), \
  31. (TB, "Guard value 4 incorrect(%#x) pShm(%p)", \
  32. ((PSHM_SHARED_MEMORY)pShm)->guardVal4, pShm)); \
  33. \
  34. TRC_ASSERT((((PSHM_SHARED_MEMORY)pShm)->guardVal5 == SHM_CHECKVAL), \
  35. (TB, "Guard value 5 incorrect(%#x) pShm(%p)", \
  36. ((PSHM_SHARED_MEMORY)pShm)->guardVal5, pShm));
  37. #else
  38. #define WDW_CHECK_SHM(pShm)
  39. #endif /* DC_DEBUG */
  40. #define WD_BREAK_ON_MEMORY_LEAK L"BreakOnMemoryLeak"
  41. #define WD_BREAK_ON_MEMORY_LEAK_DFLT 0
  42. /****************************************************************************/
  43. /* Interval for sleeping during flow control of channel writes. */
  44. /****************************************************************************/
  45. #define WD_FLOWCONTROL_SLEEPINTERVAL L"FlowControlSleepInterval"
  46. #define WD_FLOWCONTROL_SLEEPINTERVAL_DFLT (2*1000) // 2 seconds
  47. /****************************************************************************/
  48. /* Function prototypes */
  49. /****************************************************************************/
  50. NTSTATUS WDWLoad( PSDCONTEXT );
  51. NTSTATUS WDWUnload( PSDCONTEXT );
  52. NTSTATUS WDWGetClientData ( PTSHARE_WD, PSD_IOCTL );
  53. NTSTATUS WDWGetExtendedClientData(RNS_INFO_PACKET *RnsInfoPacket, PSD_IOCTL pSdIoctl);
  54. NTSTATUS WDWGetAutoReconnectInfo(PTSHARE_WD, RNS_INFO_PACKET *RnsInfoPacket, PSD_IOCTL pSdIoctl);
  55. NTSTATUS WDWGetModuleData(PTSHARE_WD, PSD_IOCTL);
  56. NTSTATUS WDWGetDefaultCoreParams(PRNS_UD_CS_CORE pClientCoreData);
  57. NTSTATUS WDWSetConfigData(PTSHARE_WD, PICA_STACK_CONFIG_DATA);
  58. NTSTATUS WDWConfConnect(PTSHARE_WD, PSD_IOCTL);
  59. NTSTATUS WDWConsoleConnect(PTSHARE_WD, PSD_IOCTL);
  60. NTSTATUS WDWShadowConnect(PTSHARE_WD, PSD_IOCTL);
  61. NTSTATUS WDWConnect(PTSHARE_WD, PRNS_UD_CS_CORE, PRNS_UD_CS_SEC,
  62. PRNS_UD_CS_NET, PTS_UD_CS_CLUSTER, PSD_IOCTL, BOOLEAN);
  63. NTSTATUS WDWDDConnect(PTSHARE_WD, PSD_IOCTL, BOOL);
  64. NTSTATUS WDWDDDisconnect(PTSHARE_WD, PSD_IOCTL, BOOLEAN);
  65. NTSTATUS WDWDDReconnect(PTSHARE_WD, PSD_IOCTL);
  66. NTSTATUS WDWDDShadowConnect(PTSHARE_WD pTSWd, PSD_IOCTL pSdIoctl);
  67. NTSTATUS WDWDDShadowDisconnect(PTSHARE_WD pTSWd, PSD_IOCTL pSdIoctl);
  68. NTSTATUS WDWDDQueryClient(PTSHARE_WD pTSWd, PSD_IOCTL pSdIOCtl);
  69. BOOL WDWParseUserData(PTSHARE_WD, PUSERDATAINFO, unsigned, PRNS_UD_HEADER,
  70. ULONG, PPRNS_UD_CS_CORE, PPRNS_UD_CS_SEC, PPRNS_UD_CS_NET,
  71. PTS_UD_CS_CLUSTER *);
  72. /****************************************************************************/
  73. /* Name: WDWStopRITTimer (macro since trace lines can't compile here) */
  74. /* */
  75. /* Purpose: Stop the RIT timer. */
  76. /* */
  77. /* Params: IN pTSWd - pointer to WD struct */
  78. /* */
  79. /* Operation: Time period is determined by the state of SCH. */
  80. /****************************************************************************/
  81. __inline void RDPCALL WDWStopRITTimer(PTSHARE_WD pTSWd)
  82. {
  83. if (pTSWd->ritTimer != NULL)
  84. KeCancelTimer(pTSWd->ritTimer);
  85. } /* WDWStopRITTimer */
  86. #ifdef __cplusplus
  87. extern "C" {
  88. #endif /* __cplusplus */
  89. NTSTATUS WDWNewShareClass(PTSHARE_WD pTSWd);
  90. void WDWDeleteShareClass(PTSHARE_WD pTSWd);
  91. void WDWTermShareClass(PTSHARE_WD pTSWd);
  92. void WDWDisconnectShareClass(PTSHARE_WD pTSWd, PSHM_SHARED_MEMORY pShm);
  93. void WDWUserLoggedOn(PTSHARE_WD pTSWd, PSD_IOCTL pSdIoctl);
  94. void WDWKeyboardSetIndicators(PTSHARE_WD pTSWd);
  95. void WDWKeyboardSetImeStatus(PTSHARE_WD pTSWd);
  96. void WDWVCMessage(PTSHARE_WD, UINT32);
  97. UCHAR WDWCompressToOutbuf(PTSHARE_WD pTSWd, UCHAR* pSrcData, ULONG cbSrcLen,
  98. UCHAR* pOutBuf, ULONG* pcbOutLen);
  99. NTSTATUS WDWSetErrorInfo(PTSHARE_WD pTSWd, PSD_IOCTL pSdIoctl);
  100. NTSTATUS WDWSendArcStatus(PTSHARE_WD pTSWd, PSD_IOCTL pSdIoctl);
  101. NTSTATUS KeyboardQueryAttributes( PTSHARE_WD, PSD_IOCTL );
  102. NTSTATUS KeyboardQueryTypematic( PTSHARE_WD, PSD_IOCTL );
  103. NTSTATUS KeyboardSetTypematic( PTSHARE_WD, PSD_IOCTL );
  104. NTSTATUS KeyboardQueryIndicators( PTSHARE_WD, PSD_IOCTL );
  105. NTSTATUS KeyboardSetIndicators( PTSHARE_WD, PSD_IOCTL );
  106. NTSTATUS KeyboardQueryIndicatorTranslation( PTSHARE_WD, PSD_IOCTL );
  107. NTSTATUS KeyboardSetLayout( PTSHARE_WD, PSD_IOCTL );
  108. NTSTATUS KeyboardFixupLayout( PVOID, PVOID, ULONG, PVOID, PVOID * );
  109. NTSTATUS KeyboardSetScanMap( PTSHARE_WD, PSD_IOCTL );
  110. NTSTATUS KeyboardSetType( PTSHARE_WD, PSD_IOCTL );
  111. NTSTATUS KeyboardSetKeyState( PTSHARE_WD pWd, PVOID *pgafPhysKeyState );
  112. BOOLEAN KeyboardHotKeyProcedure(BYTE HotkeyVk, USHORT HotkeyModifiers,
  113. PKEYBOARD_INPUT_DATA pkei, PVOID gpScancodeMap,
  114. PVOID pKbdTbl, BOOLEAN KeyboardType101,
  115. PVOID gafPhysKeyState );
  116. NTSTATUS KeyboardSetImeStatus( PTSHARE_WD, PSD_IOCTL );
  117. NTSTATUS MouseQueryAttributes( PTSHARE_WD, PSD_IOCTL );
  118. NTSTATUS VirtualCancelInput( PTSHARE_WD, PSD_IOCTL );
  119. NTSTATUS VirtualCancelOutput( PTSHARE_WD, PSD_IOCTL );
  120. NTSTATUS TerminalQueryVirtualBindings( PTSHARE_WD, PSD_IOCTL );
  121. NTSTATUS TerminalGetVirtualModuleData( PTSHARE_WD, PSD_IOCTL );
  122. NTSTATUS TerminalGetModuleData( PTSHARE_WD, PSD_IOCTL );
  123. NTSTATUS TerminalGetBufferInfo( PTSHARE_WD, PSD_IOCTL );
  124. NTSTATUS WDWSendBeep( PTSHARE_WD, PSD_IOCTL );
  125. NTSTATUS WDWClipIoctl(PTSHARE_WD, PSD_IOCTL );
  126. extern LONG WD_ShareId;
  127. #ifdef __cplusplus
  128. }
  129. #endif /* __cplusplus */
  130. #endif // !defined(_H_NWDWINT)