RDPPipe.h 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. #ifndef _FREERDP_PIPE_H__
  2. #define _FREERDP_PIPE_H__
  3. #ifdef MOD_FREERDPWRAP_EXPORTS
  4. #include "SpBase.h"
  5. #include "..\..\Tool\SpDeskShare\stdafx2.h"
  6. #define Display(fmt, ...) \
  7. Dbg("<RDPPipeSrv> :" fmt, ##__VA_ARGS__)/*; \*/
  8. //printf("<RDPPipeSrv> :" fmt "\n", ##__VA_ARGS__)
  9. void RDPPipe_SetReference(PVOID param);
  10. #else
  11. #include "Logger.h"
  12. #include "..\..\Tool\SpDeskShare\stdafx2.h"
  13. #ifdef TWINKLE_LOCAL_DEBUG
  14. #define Display(fmt, ...) \
  15. printf("<SpDeskShare> :" fmt "\n", ##__VA_ARGS__); \
  16. WRITE_DEBUG_PARAM(fmt, ##__VA_ARGS__)
  17. #else
  18. #define Display(fmt, ...) \
  19. WRITE_DEBUG_PARAM(fmt, ##__VA_ARGS__)
  20. #endif
  21. #endif
  22. //////////////////////////////////////////////////////////////////////////
  23. #define RVC_DESK2RDP_HOST_PIPE "\\\\.\\pipe\\host2rdp"
  24. #define RVC_DESK2RDP_CLIENT_PIPE "\\\\.\\pipe\\client2rdp"
  25. #define PIPE_TIMEOUT 20000
  26. #define BUF_SIZE 4096
  27. #define PRCNAME_SIZE 64
  28. #define SUFFIX_SIZE 256
  29. typedef struct _RVCRDP_CONTEXT {
  30. USHORT nBytes;
  31. USHORT usDirect;
  32. DWORD nProcessId;
  33. DWORD Param1;
  34. USHORT Param2;
  35. USHORT Param3;
  36. CHAR szProcessName[PRCNAME_SIZE];
  37. CHAR suffix[SUFFIX_SIZE];
  38. } CABINET_CONTEXT, *PCABINET_CONTEXT;
  39. //////////////////////////////////////////////////////////////////////////
  40. #ifdef MOD_FREERDPWRAP_EXPORTS
  41. #define OTHERSIDE_PIPE_NAME RVC_DESK2RDP_CLIENT_PIPE
  42. #define PROCESS_NAME "FreeRDPWrap"
  43. #else
  44. #define OTHERSIDE_PIPE_NAME RVC_DESK2RDP_HOST_PIPE
  45. #define PROCESS_NAME "SpDeskShare"
  46. #endif
  47. BOOL RDPPipe_MainEntry(LPCTSTR lpcszPipeName, LPCTSTR lpszIdentifier);
  48. BOOL RDPPipe_IsClientSurvival(BOOL& bAvailable);
  49. BOOL RDPPipe_IsHostSurvival(BOOL& bAvailable);
  50. BOOL RDPPipe_Request(
  51. USHORT usReq,
  52. BOOL bNeedReply = FALSE,
  53. LPCTSTR lpcszMessage = NULL,
  54. DWORD Param1 = 0,
  55. USHORT Param2 = 0,
  56. USHORT Param3 = 0,
  57. PCABINET_CONTEXT pContext = NULL, PDWORD pDwReturn = NULL);
  58. #endif //_FREERDP_PIPE_H__