IFunctionInstance::GetID 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 identifier string for the function instance. This identifier can be saved and later used to re-query for the same function instance through IFunctionDiscovery::GetInstance.
Syntax
HRESULT GetID(
[out] WCHAR **ppszCoMemIdentity
);
Parameters
[out] ppszCoMemIdentity
The function instance identifier string. There is no upper limit on the size of this string.
This string is a composed string generated by Function Discovery. It has the provider instance identifier string as a substring. For more information about provider identifiers, see IFunctionInstance::GetProviderInstanceID.
For function instances returned by a built-in provider, this identifier is guaranteed to uniquely identify a resource on a system, even if the resource is disconnected and reconnected. For function instances returned by custom providers, the function instance identifier is unique if the provider has a unique provider identifier.
This identifier should not be manipulated or manufactured programmatically. The string should only be used to retrieve function instances and for comparison purposes.
Be sure to free this buffer using CoTaskMemFree.
Return value
Possible return values include, but are not limited to, the following.
Return code | Description |
---|---|
|
The method completed successfully. |
|
The value of ppszCoMemID is invalid. |
|
The method is unable to allocate the memory required to perform this operation. |
Requirements
Requirement | Value |
---|---|
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 |