Skip to content

Latest commit

 

History

History
105 lines (75 loc) · 5.73 KB

nf-functiondiscoveryprovider-ifunctiondiscoveryproviderfactory-createinstance.md

File metadata and controls

105 lines (75 loc) · 5.73 KB
UID title description helpviewer_keywords old-location tech.root ms.assetid ms.date ms.keywords req.header req.include-header req.target-type req.target-min-winverclnt req.target-min-winversvr req.kmdf-ver req.umdf-ver req.ddi-compliance req.unicode-ansi req.idl req.max-support req.namespace req.assembly req.type-library req.lib req.dll req.irql targetos req.typenames req.redist ms.custom f1_keywords dev_langs topic_type api_type api_location api_name
NF:functiondiscoveryprovider.IFunctionDiscoveryProviderFactory.CreateInstance
IFunctionDiscoveryProviderFactory::CreateInstance (functiondiscoveryprovider.h)
Creates a function instance.
CreateInstance
CreateInstance method
CreateInstance method
IFunctionDiscoveryProviderFactory interface
IFunctionDiscoveryProviderFactory interface
CreateInstance method
IFunctionDiscoveryProviderFactory.CreateInstance
IFunctionDiscoveryProviderFactory::CreateInstance
functiondiscoveryprovider/IFunctionDiscoveryProviderFactory::CreateInstance
ncd.ifunctiondiscoveryproviderfactory_createinstance
ncd\ifunctiondiscoveryproviderfactory_createinstance.htm
ncd
143a4f62-7093-4127-b89e-e7d0985a92bb
12/05/2018
CreateInstance, CreateInstance method, CreateInstance method,IFunctionDiscoveryProviderFactory interface, IFunctionDiscoveryProviderFactory interface,CreateInstance method, IFunctionDiscoveryProviderFactory.CreateInstance, IFunctionDiscoveryProviderFactory::CreateInstance, functiondiscoveryprovider/IFunctionDiscoveryProviderFactory::CreateInstance, ncd.ifunctiondiscoveryproviderfactory_createinstance
functiondiscoveryprovider.h
Windows
Windows Vista [desktop apps only]
Windows Server 2008 [desktop apps only]
FunctionDiscoveryProvider.idl
Windows
19H1
IFunctionDiscoveryProviderFactory::CreateInstance
functiondiscoveryprovider/IFunctionDiscoveryProviderFactory::CreateInstance
c++
APIRef
kbSyntax
COM
FunctionDiscoveryProvider.h
IFunctionDiscoveryProviderFactory.CreateInstance

IFunctionDiscoveryProviderFactory::CreateInstance

-description

[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 function instance. All function instances should be created using this method. Other implementations that support IFunctionInstance should not be used.

-parameters

-param pszSubCategory [in]

The subcategory string for the function instance. See Subcategory Definitions.

-param pszProviderInstanceIdentity [in]

The provider instance identifier.

Function Discovery uses this identifier to ensure that function instance identifiers returned by IFunctionInstance::GetID are unique. To that end, Function Discovery attaches a prefix to the identifier passed to pszProviderInstanceIdentity to ensure that a given function instance identifier is unique across all providers. Implementers only need to ensure that pszProviderInstanceIdentity uniquely identifies the device, resource, or instance within the scope of the provider.

This string is returned to client applications that call IFunctionInstance::GetProviderInstanceID.

There is no upper limit on the size of this string.

-param iProviderInstanceContext [in]

The context associated with the specific function instance.

-param pIPropertyStore [in]

A pointer to an IPropertyStore interface.

-param pIFunctionDiscoveryProvider [in]

A pointer to the IFunctionDiscoveryProvider provider instance creating this function instance.

-param ppIFunctionInstance [out]

A pointer to an IFunctionInstance interface.

-returns

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

-remarks

The provider should specify the subcategory (may be NULL), the instance identifier, a provider-allocated context (if required), and an optional property store.

CreateInstance returns an appropriately initialized function instance to the provider.

The context specified by the provider will be passed back to the provider for all subsequent function instance related methods, such as InstanceReleased, InstancePropertyStoreOpen, InstancePropertyStoreFlush, and InstanceQueryService.

The provider must guarantee that the provider reference count does not go to zero, possibly on another thread, while CreateInstance is being called.

-see-also

IFunctionDiscoveryProviderFactory