Freigeben über


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
);

Parameter

  • 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.

Rückgabewert

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

Rückgabecode Beschreibung
S_OK

The function succeeded.

 

Hinweise

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

Anforderungen

Mindestens unterstützter Client

Windows Vista

Mindestens unterstützter Server

Windows Server 2008

Header

Mfapi.h

Bibliothek

Mfplat.lib

DLL

Mfplat.dll

Siehe auch

Media Foundation Functions

Asynchronous Callback Methods