Is there a way to find out the current count of a win32 semaphore?
Posted
by Paul Oyster
on Stack Overflow
See other posts from Stack Overflow
or by Paul Oyster
Published on 2010-05-02T17:34:11Z
Indexed on
2010/05/02
17:38 UTC
Read the original article
Hit count: 241
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.
© Stack Overflow or respective owner