先看http://www.xfocus.net/articles/200211/459.html 老大写的这个文章
管道建立的时候采用空的acl导致在任何用户下都可以连接这个管道...
实际操作时发现不行 ,咋回事?
pipea = CreateNamedPipeA(pipename,
PIPE_ACCESS_DUPLEX,
PIPE_TYPE_MESSAGE|PIPE_READMODE_MESSAGE,
0xFF,
0x1800,
0x1800,
0x1388,
NULL);
if(pipea ==INVALID_HANDLE_VALUE)
{
ret = GetLastError();
printf("error in createnamedpipe!code=%d/n",ret);
Sleep(10000);
return 0;
}
总是返回0x00000005 访问拒绝
难道必须要在win2000下? xpsp3不行啊