- fConnected = ConnectNamedPipe(hPipe,
- NULL) ? TRUE : (GetLastError() == ERROR_PIPE_CONNECTED);
- if (fConnected)
- {
- DPRINT("Pipe connected\n");
-
- hThread = CreateThread(NULL,
- 0,
- ScmNamedPipeThread,
- (LPVOID)hPipe,
- 0,
- &dwThreadId);
- if (!hThread)
- {
- DPRINT("Could not create thread (%d)\n", GetLastError());
-
- DisconnectNamedPipe(hPipe);
- CloseHandle(hPipe);
- return(FALSE);
- }
+ DPRINT("CreateNamedPipe() - calling ConnectNamedPipe(%x)\n", hPipe);
+ fConnected = ConnectNamedPipe(hPipe,
+ NULL) ? TRUE : (GetLastError() == ERROR_PIPE_CONNECTED);
+ DPRINT("CreateNamedPipe() - ConnectNamedPipe() returned %d\n", fConnected);
+
+ if (fConnected) {
+ DPRINT("Pipe connected\n");
+ hThread = CreateThread(NULL,
+ 0,
+ ScmNamedPipeThread,
+ (LPVOID)hPipe,
+ 0,
+ &dwThreadId);
+ if (!hThread) {
+ DPRINT("Could not create thread (%d)\n", GetLastError());
+ DisconnectNamedPipe(hPipe);
+ CloseHandle(hPipe);
+ DPRINT("CreateNamedPipe() - returning FALSE\n");
+ return FALSE;
+ }
+ } else {
+ DPRINT("Pipe not connected\n");
+ CloseHandle(hPipe);
+ DPRINT("CreateNamedPipe() - returning FALSE\n");
+ return FALSE;