For example, would this be valid?
CRITICAL_SECTION cs;
::InitializeCriticalSection( &cs );
::EnterCriticalSection( &cs ); // First level
::Ent
To validate the other two posts. Quick look at Critical section in WinDbg shows that cricital section maintains an integer variable to hold Recursion counts.
0:001> dt RTL_CRITICAL_SECTION
+0x000 DebugInfo : Ptr32 _RTL_CRITICAL_SECTION_DEBUG
+0x004 LockCount : Int4B
+0x008 RecursionCount : Int4B
+0x00c OwningThread : Ptr32 Void
+0x010 LockSemaphore : Ptr32 Void
+0x014 SpinCount : Uint4B
RecursionCount - It is possible for a thread to acquire a critical section more than once. This field indicates how many times the same thread has acquired the critical section. By default, the value of this field is 0, indicating that there is no thread owning the critical section.