If EnterCriticalSection is called by a thread that already owns the Critical section, a lock count on that section is incremented; that thread must call LeaveCriticalSection an equal number of times as it called EnterCriticalSection to clear the lock count on that section before it is released to another thread. So your TLocker Object may want to include a lock count field that is incremented during Lock, and decremented during Unlock, and write a ClearLockCount procedure so it can release itself the appropiate number of times.