The Wxutil.h header file in the DirectShow base classes provides functions to make deadlocks easier to track. It is useful to insert an assertion in the code that says whether a critical section is owned or not. The routines that do the checking are global functions to avoid having different numbers of member functions in the debug and retail class implementations of CCritSec. In addition, Wxutil.h provides a routine that enables you to trace usage of specific critical sections. Because of the large number of critical sections, this assertion defaults to off.
Name | Description |
CritCheckIn | Checks that the current thread is the owner of the given critical section. |
CritCheckOut | Checks that the current thread is not the owner of the given critical section. |
DbgLockTrace | Enables or disables debug logging of a given critical section. |
Checks that the owner of pcCrit is the current thread.
BOOL WINAPI CritCheckIn(
CCritSec * pcCrit
);
Returns TRUE if the current thread is the owner of this critical section, or FALSE otherwise.
If you call this function when DEBUG is not defined and you've included the DirectShow headers, it will always return TRUE.
Checks that the owner of pcCrit is not the current thread.
BOOL WINAPI CritCheckOut(
CCritSec * pcCrit
);
Returns TRUE if the current thread is not the owner of this critical section, or FALSE otherwise.
If you call this function when DEBUG is not defined and you've included the DirectShow headers, it will always return TRUE.
Enables or disables debug logging of a given critical section.
void WINAPI DbgLockTrace(
CCritSec * pcCrit,
BOOL fTrace
);
No return value.
This function does nothing unless DEBUG is defined when the DirectShow headers are included.
© 1997 Microsoft Corporation. All rights reserved. Terms of Use.