void _main(){{wchar_t * pipeName=L"\\\\.\\pipe\\mypipe";HANDLE hPipe=INVALID_HANDLE_VALUE;BOOL fConnected=FALSE;hPipe=CreateNamedPipeW( pipeName, PIPE_TYPE_MESSAGE | PIPE_READMODE_MESSAGE | PIPE_WAIT, PIPE_UNLIMITED_INSTANCES, BUFSIZE, BUFSIZE, NMPWAIT_USE_DEFAULT_WAIT, NULL);fConnected=ConnectNamedPipe(hPipe, NULL) ? TRUE : (GetLastError()==ERROR_PIPE_CONNECTED);CloseHandle(hPipe);}}
static void main(){{wchar_t * pipeName=L"\\\\.\\pipe\\mypipe";HANDLE hPipe=INVALID_HANDLE_VALUE;BOOL fConnected=FALSE;hPipe=CreateNamedPipeW( pipeName, PIPE_TYPE_MESSAGE | PIPE_READMODE_MESSAGE | PIPE_WAIT, PIPE_UNLIMITED_INSTANCES, BUFSIZE, BUFSIZE, NMPWAIT_USE_DEFAULT_WAIT, NULL);if (hPipe==INVALID_HANDLE_VALUE){exit(1);}if (GetLastError()==ERROR_ACCESS_DENIED){exit(1);}fConnected=ConnectNamedPipe(hPipe, NULL) ? TRUE : (GetLastError()==ERROR_PIPE_CONNECTED);CloseHandle(hPipe);}}