6 # pragma warning(push,1) /* disable warnings within system headers */
25 #define EXPORT_PIPE_API
27 //============================================================================
29 //============================================================================
31 // Because the value of an invalid HANDLE returned by API functions differs
32 // between different functions and differs on different Windows platforms,
33 // this function checks wether the handle has a meaningfull value.
36 #define IsValidHandle( handle ) ((DWORD)(handle) + 1 > 1)
40 inline bool IsValidHandle( HANDLE handle
)
42 return INVALID_HANDLE_VALUE
!= handle
&& NULL
!= handle
;
50 EXPORT_PIPE_API HANDLE WINAPI
CreateSimplePipeA( LPCSTR lpName
);
51 EXPORT_PIPE_API HANDLE WINAPI
CreateSimplePipeW( LPCWSTR lpName
);
54 #define CreateSimplePipe CreateSimplePipeW
56 #define CreateSimplePipe CreateSimplePipeA
59 EXPORT_PIPE_API HANDLE WINAPI
OpenSimplePipeA( LPCSTR lpName
);
60 EXPORT_PIPE_API HANDLE WINAPI
OpenSimplePipeW( LPCWSTR lpName
);
63 #define OpenSimplePipe OpenSimplePipeW
65 #define OpenSimplePipe OpenSimplePipeA
68 EXPORT_PIPE_API HANDLE WINAPI
AcceptSimplePipeConnection( HANDLE hPipe
);
70 EXPORT_PIPE_API BOOL WINAPI
WaitForSimplePipeA( LPCSTR lpName
, DWORD dwTimeOut
);
71 EXPORT_PIPE_API BOOL WINAPI
WaitForSimplePipeW( LPCWSTR lpName
, DWORD dwTimeOut
);
74 #define WaitForSimplePipe WaitForSimplePipeW
76 #define WaitForSimplePipe WaitForSimplePipeA
80 EXPORT_PIPE_API BOOL WINAPI
WriteSimplePipe( HANDLE hPipe
, LPCVOID lpBuffer
, DWORD dwBytesToWrite
, LPDWORD lpBytesWritten
, BOOL bWait
);
81 EXPORT_PIPE_API BOOL WINAPI
ReadSimplePipe( HANDLE hPipe
, LPVOID lpBuffer
, DWORD dwBytesToRead
, LPDWORD lpBytesRead
, BOOL bWait
);
82 EXPORT_PIPE_API BOOL WINAPI
CloseSimplePipe( HANDLE hPipe
);
88 #endif // _PIPEIMPL_H_