Pipe in release mode
-
I am on XP and I have created an overlapped mode pipe. I call ConnectNamedPipe and set the event on wait in WaitForSingleObject. Problem comes when the WaitForSingleObject times out in release mode compile. Any other call to the pipe handle on which no client connects and connection time out throws some exception in release mode :confused:. It all works fine in debug mode.
OVERLAPPED op; op.hEvent = CreateEvent(.... HANDLE hPipe = ConnectNamedPipe(.... switch(WaitForSingleObject(op.hEvent, 5000) { case WAIT_OBJECT_0: ... // all works fine CloseHandle(hPipe); // also works fine case WAIT_TIMOUT: ... // any call to hPipe throws unhandled exception CloseHandle(hPipe); // throws unhandled exception }
PS: every thing works fine in Debug mode...Exceptions come in on release mode :sigh: Atif