Hi, here is a link to a code that shows how to use an undocumented Win32 API call to query the value of a semaphore: http://www.codeguru.com/win32/querysem.shtml It works fine for WinNT, Win2000 and WindowsXP! regards, wolfgang