Επεξεργασία

Κοινή χρήση μέσω


IObjectProvider::QueryObject method (shobjidl_core.h)

Queries for a specified object.

Syntax

HRESULT QueryObject(
  [in]  REFGUID guidObject,
  [in]  REFIID  riid,
  [out] void    **ppvOut
);

Parameters

[in] guidObject

Type: REFGUID

A reference to the GUID used to identify the object.

[in] riid

Type: REFIID

Specifies the desired interface ID.

[out] ppvOut

Type: void**

On success, contains the address of a pointer to the object specified by riid.

Return value

Type: HRESULT

If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.

Remarks

Object implementers that want to enable the discovery of other objects that they can produce or that they hold should implement IObjectProvider::QueryObject and publish the GUID values that name those objects for clients of that object. Note that objects should not pass on the request for an object to other objects like QueryService.

Requirements

Requirement Value
Minimum supported client Windows Vista [desktop apps only]
Minimum supported server Windows Server 2008 [desktop apps only]
Target Platform Windows
Header shobjidl_core.h (include Shobjidl.h)