DirectShow Animated Header -- Wait Debugging DirectShow Animated Header -- Wait Debugging* Microsoft DirectShow SDK
*Index  *Topic Contents
*Previous Topic: Object Register Debugging
*Next Topic: Debug Output Location

Wait Debugging


DirectShow provides facilities for wait debugging. These facilities build on the Microsoft® Win32® HANDLE-based wait facilities, but you can expand them to debug specific wait conditions.

In the debug build, you can update the global current time-out with calls to DbgSetWaitTimeout. Updating the current time-out does not affect debug wait calls that are already waiting. If this is a debug build and a value named TIMEOUT exists in the registry under the HKEY_LOCAL_MACHINE\SOFTWARE\Debug\GLOBAL key, the TIMEOUT value is used as the initial current time-out. TIMEOUT must be a REG_DWORD value and is measured in milliseconds. If not, the initial time-out defaults to INFINITE.

Call the following functions to perform debuggable waiting.
Name Description
DbgSetWaitTimeout Updates the current time-out value.
DbgWaitForMultipleObjects Waits for an array of handles to be signaled, or for the current time-out to expire.
DbgWaitForSingleObject Waits for a handle to be signaled, or for the current time-out to expire.


DbgSetWaitTimeout

Wait Debugging

Updates the global current time-out value. (This update does not apply to debug wait calls that are already waiting.)

void WINAPI DbgSetWaitTimeout(
  DWORD dwTimeout
  );

Parameters
dwTimeout
New time-out value in milliseconds, or INFINITE.
Remarks

DbgSetWaitTimeout is ignored unless DEBUG is defined when the Microsoft® DirectShow™ headers are included.


DbgWaitForMultipleObjects

Wait Debugging

In a debug build, waits for the current time-out, or the array of handles to become signaled, whichever comes first. In other builds, this is treated as a call to the Microsoft Win32® WaitForMultipleObjects function, with an INFINITE time-out.

DWORD WINAPI DbgWaitForMultipleObjects(
  DWORD nCount,
  CONST HANDLE *lpHandles,
  BOOL bWaitAll
  );

Parameters
nCount
Number of entries in the lpHandles array.
lpHandles
Array of HANDLE values.
bWaitAll
TRUE if all handles in the array must become signaled to satisfy the wait. FALSE if any one handle can satisfy the wait.


DbgWaitForSingleObject

Wait Debugging

In a debug build, waits for the current time-out, or the given handle to become signaled. In other builds, this is treated as a call to the Microsoft Win32 WaitForSingleObject function, with an INFINITE time-out.

DWORD WINAPI DbgWaitForSingleObject(
  HANDLE h
  );

Parameters
h
HANDLE value.

© 1998 Microsoft Corporation. All rights reserved. Terms of Use.

*Top of Page