#ifndef _FREERDP_PIPE_H__ #define _FREERDP_PIPE_H__ #ifdef MOD_FREERDPWRAP_EXPORTS #include "SpBase.h" #include "..\..\Tool\SpDeskShare\stdafx2.h" #define Display(fmt, ...) \ Dbg(" :" fmt, ##__VA_ARGS__)/*; \*/ //printf(" :" fmt "\n", ##__VA_ARGS__) void RDPPipe_SetReference(PVOID param); #else #include "Logger.h" #include "..\..\Tool\SpDeskShare\stdafx2.h" #ifdef TWINKLE_LOCAL_DEBUG #define Display(fmt, ...) \ printf(" :" fmt "\n", ##__VA_ARGS__); \ WRITE_DEBUG_PARAM(fmt, ##__VA_ARGS__) #else #define Display(fmt, ...) \ WRITE_DEBUG_PARAM(fmt, ##__VA_ARGS__) #endif #endif ////////////////////////////////////////////////////////////////////////// #define RVC_DESK2RDP_HOST_PIPE "\\\\.\\pipe\\host2rdp" #define RVC_DESK2RDP_CLIENT_PIPE "\\\\.\\pipe\\client2rdp" #define PIPE_TIMEOUT 20000 #define BUF_SIZE 4096 #define PRCNAME_SIZE 64 #define SUFFIX_SIZE 256 typedef struct _RVCRDP_CONTEXT { USHORT nBytes; USHORT usDirect; DWORD nProcessId; DWORD Param1; USHORT Param2; USHORT Param3; CHAR szProcessName[PRCNAME_SIZE]; CHAR suffix[SUFFIX_SIZE]; } CABINET_CONTEXT, *PCABINET_CONTEXT; ////////////////////////////////////////////////////////////////////////// #ifdef MOD_FREERDPWRAP_EXPORTS #define OTHERSIDE_PIPE_NAME RVC_DESK2RDP_CLIENT_PIPE #define PROCESS_NAME "FreeRDPWrap" #else #define OTHERSIDE_PIPE_NAME RVC_DESK2RDP_HOST_PIPE #define PROCESS_NAME "SpDeskShare" #endif BOOL RDPPipe_MainEntry(LPCTSTR lpcszPipeName, LPCTSTR lpszIdentifier); BOOL RDPPipe_IsClientSurvival(BOOL& bAvailable); BOOL RDPPipe_IsHostSurvival(BOOL& bAvailable); BOOL RDPPipe_Request( USHORT usReq, BOOL bNeedReply = FALSE, LPCTSTR lpcszMessage = NULL, DWORD Param1 = 0, USHORT Param2 = 0, USHORT Param3 = 0, PCABINET_CONTEXT pContext = NULL, PDWORD pDwReturn = NULL); #endif //_FREERDP_PIPE_H__