RoActivateInstance function
Activates the specified Windows Runtime class.
Syntax
HRESULT WINAPI RoActivateInstance( _In_ HSTRING activatableClassId, _Out_ IInspectable **instance );
Parameters
- activatableClassId [in]
-
Type: HSTRING
The class identifier that is associated with the activatable runtime class.
- instance [out]
-
Type: IInspectable**
A pointer to the activated instance of the runtime class.
Return value
Type: HRESULT
This function can return one of these values.
| Return code | Description |
|---|---|
|
The class was activated successfully. |
|
instance is NULL. |
|
The thread has not been initialized in the Windows Runtime by calling the RoInitialize function. |
|
The TrustLevel for the class requires a full-trust process. |
|
The IInspectable interface is not implemented by the specified class. |
|
Failed to create an instance of the class. |
Remarks
Use the RoActivateInstance function to activate a Windows Runtime class. The RoActivateInstance 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.
Requirements
|
Minimum supported client |
Windows 8 [desktop apps | Windows Store apps] |
|---|---|
|
Minimum supported server |
Windows Server 2012 [desktop apps | Windows Store apps] |
|
Minimum supported phone |
Windows Phone 8 |
|
Header |
|
See also