Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

MFCreateAsyncResult function

Creates an asynchronous result object. Use this function if you are implementing an asynchronous method.

Syntax


HRESULT MFCreateAsyncResult(
   IUnknown         *punkObject,
   IMFAsyncCallback *pCallback,
   IUnknown         *punkState,
   IMFAsyncResult   **ppAsyncResult
);

Parameters

punkObject

Pointer to the object stored in the asynchronous result. This pointer is returned by the IMFAsyncResult::GetObject method. This parameter can be NULL.

pCallback

Pointer to the IMFAsyncCallback interface. This interface is implemented by the caller of the asynchronous method.

punkState

Pointer to the IUnknown interface of a state object. This value is provided by the caller of the asynchronous method. This parameter can be NULL.

ppAsyncResult

Receives a pointer to the IMFAsyncResult interface. The caller must release the interface.

Return value

The function returns an HRESULT. Possible values include, but are not limited to, those in the following table.

Return codeDescription
S_OK

The function succeeded.

 

Remarks

To invoke the callback specified in pCallback, call the MFInvokeCallback function.

Requirements

Minimum supported client

Windows Vista [desktop apps | Windows Store apps]

Minimum supported server

Windows Server 2008 [desktop apps | Windows Store apps]

Minimum supported phone

Windows Phone 8

Header

Mfapi.h

Library

Mfplat.lib

DLL

Mfplat.dll

See also

Media Foundation Functions
Asynchronous Callback Methods

 

 

Show:
© 2016 Microsoft