IMFGetService::GetService Method

Retrieves a service interface.

Syntax

public:
HRESULT GetService(
         REFGUID guidService,
         REFIID riid,
         LPVOID *ppvObject
)  

Parameters

guidService
Type: REFGUID 

[in]

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

riid
Type: REFIID 

[in]

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

ppvObject
Type: LPVOID *

[out, optional]

Receives the interface pointer. The caller must release the interface.

Return value

Type: HRESULT 

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

Return codes
Return code Description
S_OK The method succeeded.
MF_E_UNSUPPORTED_SERVICE The object does not support the service.

Refer to Media Foundation return codes.

Requirements

Header: Declared in mfidl.h.

Library: Use mfuuid.lib.