CComObjectRootEx::Lock

void Lock( );

Remarks

If the thread model is multithreaded, this method calls the Win32 API function EnterCriticalSection, which waits until the thread can take ownership of the critical section object obtained through the m_critsec data member. When the protected code finishes executing, the thread must call Unlock to release ownership of the critical section.

If the thread model is single-threaded, this method does nothing.

CComObjectRootEx OverviewClass Members

See Also   CComObjectRootEx::Unlock, CComObjectRootEx::m_critsec