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
}

 

posted on 2024-04-07 08:17  lydstory  阅读(3)  评论(0编辑  收藏  举报

导航