Export (0) Print
Expand All
Expand Minimize

MFLockWorkQueue function

Locks a work queue.

Syntax


HRESULT MFLockWorkQueue(
  _In_  DWORD dwWorkQueue
);

Parameters

dwWorkQueue [in]

The identifier for the work queue. The identifier is returned by the MFAllocateWorkQueue function.

Return value

If this function succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.

Remarks

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.

Windows Phone 8.1: This API is supported.

Requirements

Minimum supported client

Windows Vista [desktop apps | Windows Store apps]

Minimum supported server

Windows Server 2008 [desktop apps | Windows Store apps]

Header

Mfapi.h

Library

Mfplat.lib

DLL

Mfplat.dll

See also

Media Foundation Functions
Work Queues

 

 

Community Additions

ADD
Show:
© 2014 Microsoft