Share via


CCritSec::Lock

 
Microsoft DirectShow 9.0

CCritSec::Lock

The Lock method locks the critical section object.

Syntax

  void Lock(void);

Remarks

This method calls the Microsoft® Win32® EnterCriticalSection method.

Call the CCritSec::Unlock member function to unlock the critical section. You can make multiple calls to the Lock method on the same thread; be sure to call Unlock a corresponding number of times.

If the object is already locked by another thread, the CCritSec::Lock method blocks until the object is released, or until a possible-deadlock exception occurs.

Requirements

**  Header:** Declared in Wxutil.h; include Streams.h.

**  Library:** Use Strmbase.lib (retail builds) or Strmbasd.lib (debug builds).

See Also