引用here:关于使用的CreateFile在Windows中打开一个管道:
hPipe = CreateFile(
lpszPipename, // pipe name
GENERIC_READ | // read and write access
GENERIC_WRITE,
0, // no sharing
NULL, // default security attributes
OPEN_EXISTING, // opens existing pipe
0, // default attributes
NULL);
如何能在上面的代码确保它实际上是打开管道,而不是现有的硬盘文件?
顺便说一句,我怎样才能打开一个持久管道,以便可以多次使用?