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 code | Description |
|---|---|
|
The method succeeded. |
|
The service requested cannot be found in the object represented by punkObject. |
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.1 |
|
Header |
|
|
Library |
|
|
DLL |
|
See also