IServiceProvider::QueryService(REFGUID,REFIID,void**) method (servprov.h)

Syntax

HRESULT QueryService(
  REFGUID guidService,
  REFIID  riid,
  void    **ppvObject
);

Parameters

guidService

The unique identifier of the service (an SID).

riid

The unique identifier of the interface that the caller wants to receive for the service.

ppvObject

The address of the caller-allocated variable to receive the interface pointer of the service on successful return from this function. The caller becomes responsible for calling Release through this interface pointer when the service is no longer required.

Return value

S_OK on success.

Remarks

QueryService creates or accesses the implementation of the service identified with guidService. In ppv, it returns the address of the interface that is specified by riid.

Requirements

Requirement Value
Minimum supported client Windows Build 22000
Minimum supported server Windows Build 22000
Header servprov.h