Share via


CComCritSecLock::Lock

Call this method to lock the critical section object.

HRESULT Lock( ) throw( );

Return Value

Returns S_OK if the object has successfully been locked, or an error HRESULT on failure.

Remarks

If the object is already locked, an ASSERT error will occur in debug builds.

Requirements

Header: atlbase.h

See Also

Reference

CComCritSecLock Class

CComCritSecLock::Unlock

Other Resources

CComCritSecLock Members