//既可以运行于服务器端,也可以运行于客户端,
//用于将读操作与写操作整合到一个API调用中,从而达到了减轻MSNP重定向器收发数据的负担,优化网络I/O的性能.
BOOL TransactNamedPipe(
HANDLE hNamedPipe, // handle to named pipe
//打开的命名管道句柄,由创建服务器端的命名管道函数或客户端的打开命名管道函数返回
LPVOID lpInBuffer, // pointer to write buffer
DWORD nInBufferSize, // size of the write buffer, in bytes
//写缓冲区的开始地址与需要写入的数据量大小
LPVOID lpOutBuffer, // pointer to read buffer
DWORD nOutBufferSize, // size of read buffer, in bytes
//读缓冲区的开始地址与能够读入的数据量
LPDWORD lpBytesRead, // pointer to variable for bytes read
//实际读取的数据量
LPOVERLAPPED lpOverlapped // pointer to overlapped structure
//重叠操作结构
);