Why does
HANDLE mutexHandle = INVALID_HANDLE_VALUE;
WaitForSingleObject(mutexHandle, INFINITE);
block? It does not return with an error message. Checking the handle for INVALID_HANDLE would be stupid for a mutex as I would need a mutex for accessing the mutex handle...
BTW: It does return with WAIT_FAILED if the handle was closed.
...
I am creating an application that implements inter process communication.
For this purpose I have set up a shared buffer, which seems to work fine.
Now, I need a way for the data generating application (written in c++)
to tell the data receiving application (written in freepascal/lazarus)
when it should read the data.
I was trying to...
Below is my program and I am trying to get the call stack when the process is blocked in WaitForSingleObject() call using windbg. The strange thing is when the process is blocking, windbg only prints out very strange stack.
wow64cpu!TurboDispatchJumpAddressEnd+0x690
wow64cpu!TurboDispatchJumpAddressEnd+0x484
wow64!Wow64SystemServiceEx...
I'm using a 3rd party tool, which uses a 4th party plugin. Occasionally, the tool will hang when launched. Looking at the stack traces, I can see a few threads are waiting on WaitForSingleObject, and my bet is that they're blocking each other. Some of the threads start at the 3rt party tool, and some at the 4th party plugin.
What I'd li...
I am implementing a Go Back N protocol for a networking class. I am using WaitForSingleObject to know when the socket on my receiver thread has data inside it:
int result = WaitForSingleObject(dataReady, INFINITE);
For Go Back N, I have to send multiple packets to the receiver at once, and manipulate the data, and then send an ACK pac...