Is there a way to find out the current count of a win32 semaphore?
- by Paul Oyster
I'm looking for a way with no side effects.
Ideally, the following code would do the trick:
long currentCount = 0;
::ReleaseSemaphore(h, 0, ¤tCount);
But unfortunately 0 is not allowed as the value of lReleaseCount, so the call returns FALSE.