title: How do you get the current count from CSemaphore?
body: <p>I am trying to debug a multi-threaded program that uses <a href="http://msdn.microsoft.com/en-us/library/78w43c88%28v=vs.80%29.aspx" rel="nofollow">CSemaphore</a> to limit the size of a buffer.</p>
  
  <p>How do you get the current value of the semaphore counter from this class? It doesn't seem to be directly accessed from any of its members, and I can't seem to find any functions that will give me it either.</p>