Locks a work queue.
HRESULT MFLockWorkQueue(
DWORD dwWorkQueue
)
dwWorkQueue
Type: DWORDÂ
[in] The identifier for the work queue. The identifier is returned by the MFAllocateWorkQueue function.
Type: HRESULTÂ
If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.
Refer to Media Foundation return codes.
This function prevents the MFShutdown function from shutting down the work queue. Use this function to ensure that asynchronous operations on the work queue complete gracefully before the platform shuts down. The MFShutdown function blocks until the work queue is unlocked, or until a fixed wait period has elapsed. (The wait period is a few seconds.)
Call MFUnlockWorkQueue to unlock the work queue. Each call to MFLockWorkQueue must be matched by a corresponding call to MFUnlockWorkQueue.
Note
The MFAllocateWorkQueue function implicitly locks the work queue that it creates.
Header: Declared in mfapi.h.
Library: Use mfplat.lib.