Wait Debugging Functions
[The feature associated with this page, DirectShow, is a legacy feature. It has been superseded by MediaPlayer, IMFMediaEngine, and Audio/Video Capture in Media Foundation. Those features have been optimized for Windows 10 and Windows 11. Microsoft strongly recommends that new code use MediaPlayer, IMFMediaEngine and Audio/Video Capture in Media Foundation instead of DirectShow, when possible. Microsoft suggests that existing code that uses the legacy APIs be rewritten to use the new APIs if possible.]
Microsoft DirectShow provides several functions for debugging infinite waits.
In retail builds, the DbgWaitForMultipleObjects and DbgWaitForSingleObject functions work like their Windows API counterparts, WaitForMultipleObjects and WaitForSingleObject, with infinite time-out intervals.
In debug builds, these functions use a global time-out value. If the time-out expires, the function triggers an assert. The following registry key specifies the time-out value, in milliseconds:
HKEY_LOCAL_MACHINE\<DebugRoot>\<Module Name>\TIMEOUT
where <DebugRoot> is the registry path described in the topic Debug Output Functions.
If the key does not exist, the time-out value defaults to INFINITE. You can use the DbgSetWaitTimeout function to override the registry entry.
Function | Description |
---|---|
DbgSetWaitTimeout | Sets the debugging time-out value. |
DbgWaitForMultipleObjects | Waits for any (or all) of the specified objects to be signaled. |
DbgWaitForSingleObject | Waits for an object to become signaled. |