IFunctionDiscovery::CreateInstanceQuery method

[Function Discovery is available for use in the operating systems specified in the Requirements section. It may be altered or unavailable in subsequent versions.]

Creates a query for a specific function instance.

Syntax

HRESULT CreateInstanceQuery(
  const WCHAR                    *pszFunctionInstanceIdentity,
  IFunctionDiscoveryNotification *pIFunctionDiscoveryNotification,
  FDQUERYCONTEXT                 *pfdqcQueryContext,
  IFunctionInstanceQuery         **ppIFunctionInstanceQuery
);

Parameters

pszFunctionInstanceIdentity

The identifier of the function instance.

pIFunctionDiscoveryNotification

A pointer to the IFunctionDiscoveryNotification interface implemented by the calling application. If specified, it enables the Function Discovery change notification process. This parameter can be NULL; however it is required for network providers.

pfdqcQueryContext

A pointer to the context in which the query was created. The type FDQUERYCONTEXT is defined as a DWORDLONG.

ppIFunctionInstanceQuery

A pointer to an IFunctionInstanceQuery interface pointer used to return the generated query.

Return Value

Possible return values include, but are not limited to, the following.

Return code Description
S_OK
The method completed successfully.
E_INVALIDARG
ppIFunctionInstanceQuery is NULL.
E_OUTOFMEMORY
The method is unable to allocate the memory required to perform this operation.

Remarks

Function Discovery Network providers only return instances through the IFunctionDiscoveryNotification interface.

This method only initializes the query call. The Execute method of the IFunctionInstanceQuery interface returned in ppIFunctionInstanceQuery must be called to perform the query and return any data.

Requirements

   
Minimum supported client Windows Vista [desktop apps only]
Minimum supported server Windows Server 2008 [desktop apps only]
Target Platform Windows
Header functiondiscoveryapi.h
DLL FunDisc.dll

See Also

Function Discovery Queries

IFunctionDiscovery