名前付きパイプがあり、システムで実行されるクライアントを使用してアクセスしている間は正常に動作します
クライアントは、次のコードを使用してファイルを開こうとします。
LPTSTR lpszPipename = TEXT("\\\\smyServerName\\pipe\\iPipe01");
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);
if (hPipe != INVALID_HANDLE_VALUE)
break;
// Exit if an error other than ERROR_PIPE_BUSY occurs.
if (GetLastError() != ERROR_PIPE_BUSY)
{
_tprintf( TEXT("Could not open pipe. GLE=%d\n"), GetLastError() );
return -1;
}
私が使用した名前付きパイプの作成中に
lpszPipename = TEXT("\\\\.\\pipe\\iPipe01");
の代わりにmyServerName
を使用し.(Dot)
ました。別のシステムからクライアントを実行しているときに、GLE 5 (アクセスが拒否されました) が発生します。