CallNamedPipe tchar
#include <tchar.h>
#include <windows.h>
#define BG_PIPE_NAME _T("\\\\.\\pipe\\BG")
// Make sure that szInBuffer, BG_PIPE_LENGTH, szOutBuffer, and cbRead are properly defined and declared.
if (!CallNamedPipe(
BG_PIPE_NAME, // pipe name
szInBuffer, // message to server
BG_PIPE_LENGTH, // message length
szOutBuffer, // buffer to receive reply
BG_PIPE_LENGTH, // size of read buffer
&cbRead, // number of bytes read
3000)) // timeout duration
{
// Handle error or failure
}
浙公网安备 33010602011771号