Condividi tramite


GetActivationFactory Function

 

The new home for Visual Studio documentation is Visual Studio 2017 Documentation on docs.microsoft.com.

The latest version of this topic can be found at GetActivationFactory Function.

Retrieves an activation factory for the type specified by the template parameter.

Syntax

template<  
   typename T  
>  
inline HRESULT GetActivationFactory(  
   _In_ HSTRING activatableClassId,  
   _Out_ Microsoft::WRL::Details::ComPtrRef<T> factory  
);  

Parameters

T
A template parameter that specifies the type of the activation factory.

activatableClassId
The name of the class that the activation factory can produce.

factory
When this operation completes, a reference to the activation factory for type T.

Return Value

S_OK if successful; otherwise, an error HRESULT that indicates why this operation failed.

Requirements

Header: client.h

Namespace: Windows::Foundation

See Also

Windows::Foundation Namespace