IActivationFactory::ActivateInstance method (activation.h)
Creates a new instance of the Windows Runtime class that is associated with the current activation factory.
HRESULT ActivateInstance( IInspectable **instance );
A pointer to a new instance of the class that is associated with the current activation factory.
This function can return the following values.
||The new class instance was created successfully.|
||instance is NULL.|
||The IInspectable interface is not implemented by the class that is associated with the current activation factory.|
||Failed to create an instance of the class.|
Use the ActivateInstance function to activate a Windows Runtime class. The ActivateInstance function connects to the activation factory that is associated with the specified activatable class identifier, creates an instance by calling the zero-argument constructor on the class, and releases the activation factory.
|Minimum supported client||Windows 8 [desktop apps | UWP apps]|
|Minimum supported server||Windows Server 2012 [desktop apps | UWP apps]|