IFunctionDiscovery::GetInstance method (functiondiscoveryapi.h)
[Function Discovery is available for use in the operating systems specified in the Requirements section. It may be altered or unavailable in subsequent versions.]
Gets the specified function instance, based on identifier.
HRESULT GetInstance( [in] const WCHAR *pszFunctionInstanceIdentity, [out] IFunctionInstance **ppIFunctionInstance );
The identifier of the function instance (see GetID).
A pointer to an IFunctionInstance interface pointer used to return the interface.
Possible return values include, but are not limited to, the following.
||The method completed successfully.|
||The value of pszFunctionInstanceIdentity is invalid.|
||The method is unable to allocate the memory required to perform this operation.|
||The function instance represented by the specified ID does not exist on this computer.|
||The call was executed for a provider that returns results asynchronously.|
Some function discovery providers return their query results with the IFunctionDiscoveryNotification interface. GetInstance does not find function instances that are returned in this way and will fail with E_PENDING. It is recommended that clients use the CreateInstanceQuery method of the IFunctionDiscovery interface to find function instances for such providers.
|Minimum supported client||Windows Vista [desktop apps only]|
|Minimum supported server||Windows Server 2008 [desktop apps only]|