Export (0) Print
Expand All
Expand Minimize

MFGetService function

Queries an object for a specified service interface.

This function is a helper function that wraps the IMFGetService::GetService method. The function queries the object for the IMFGetService interface and, if successful, calls GetService on the object.

Syntax


HRESULT MFGetService(
  IUnknown *punkObject,
  REFGUID guidService,
  REFIID riid,
  LPVOID *ppvObject
);

Parameters

punkObject

A pointer to the IUnknown interface of the object to query.

guidService

The service identifier (SID) of the service. For a list of service identifiers, see Service Interfaces.

riid

The interface identifier (IID) of the interface being requested.

ppvObject

Receives the interface pointer. 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 method succeeded.

MF_E_UNSUPPORTED_SERVICE

The service requested cannot be found in the object represented by punkObject.

 

Remarks

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

Mfidl.h

Library

Mf.lib

DLL

Mf.dll

See also

IMFGetService
Media Foundation Functions
Service Interfaces

 

 

Community Additions

ADD
Show:
© 2014 Microsoft