ActivateInstance 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 ActivateInstance Function.
Registers and retrieves an instance of a specified type defined in a specified class ID.
Syntax
template<
typename T
>
inline HRESULT ActivateInstance(
_In_ HSTRING activatableClassId,
_Out_ Microsoft::WRL::Details::ComPtrRef<T> instance
);
Parameters
T
A type to activate.
activatableClassId
The name of the class ID that defines parameter T
.
instance
When this operation completes, a reference to an instance of T
.
Return Value
S_OK if successful; otherwise, an error HRESULT that indicates the cause of the error.
Requirements
Header: client.h
Namespace: Windows::Foundation