IProviderPublishing::CreateInstance method (functiondiscoveryprovider.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.]

Creates a new function instance.

Syntax

HRESULT CreateInstance(
  [in]  SystemVisibilityFlags enumVisibilityFlags,
  [in]  const WCHAR           *pszSubCategory,
  [in]  const WCHAR           *pszProviderInstanceIdentity,
  [out] IFunctionInstance     **ppIFunctionInstance
);

Parameters

[in] enumVisibilityFlags

A SystemVisibilityFlags enumeration value that specifies the visibility of the function instance which the provider is about to create. It is up to the provider whether or not to honor this flag, however the current user visibility can be used to allow processes running in a non-Administrator security context to still be able to add function instances.

[in] pszSubCategory

The subcategory string for the function instance.

[in] pszProviderInstanceIdentity

The provider instance identifier.

[out] ppIFunctionInstance

A pointer to an IFunctionInstance interface pointer used to return the newly created function instance.

Return value

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

Return code Description
S_OK
The method completed successfully.
E_INVALIDARG
One of the parameters contains an invalid argument.
E_POINTER
pszSubCategory, pszProviderInstanceIdentity, or ppInstance parameter is NULL.

Requirements

Requirement Value
Minimum supported client Windows Vista [desktop apps only]
Minimum supported server Windows Server 2008 [desktop apps only]
Target Platform Windows
Header functiondiscoveryprovider.h

See also

IProviderPublishing