SimpleActivationFactory Class
Provides a fundamental mechanism to create a Windows Runtime or classic COM base class.
template<typename Base>
class SimpleActivationFactory : public ActivationFactory<>;
Base
A base class.
The base class must provide a default constructor.
The following code example demonstrates how to use SimpleActivationFactory with the ActivatableClassWithFactoryEx macro.
ActivatableClassWithFactoryEx(MyClass, SimpleActivationFactory, MyServerName);
Name | Description |
---|---|
SimpleActivationFactory::ActivateInstance Method | Creates an instance of the specified interface. |
SimpleActivationFactory::GetRuntimeClassName Method | Gets the runtime class name of an instance of the class specified by the Base class template parameter. |
SimpleActivationFactory::GetTrustLevel Method | Gets the trust level of an instance of the class specified by the Base class template parameter. |
I0
ChainInterfaces
I0
RuntimeClassBase
ImplementsHelper
DontUseNewUseMake
RuntimeClassFlags
RuntimeClassBaseT
RuntimeClass
ActivationFactory
SimpleActivationFactory
Header: module.h
Namespace: Microsoft::WRL
Creates an instance of the specified interface.
STDMETHOD( ActivateInstance )(
_Deref_out_ IInspectable **ppvObject
);
ppvObject
When this operation completes, pointer to an instance of the object specified by the Base
class template parameter.
S_OK if successful; otherwise, an HRESULT that indicates the error.
If __WRL_STRICT__
is defined, an assert error is emitted if the base class specified in the class template parameter isn't derived from RuntimeClass, or isn't configured with the WinRt or WinRtClassicComMix RuntimeClassType enumeration value.
Gets the runtime class name of an instance of the class specified by the Base
class template parameter.
STDMETHOD( GetRuntimeClassName )(
_Out_ HSTRING* runtimeName
);
runtimeName
When this operation completes, the runtime class name.
S_OK if successful; otherwise, an HRESULT that indicates the error.
If __WRL_STRICT__
is defined, an assert error is emitted if the class specified by the Base
class template parameter isn't derived from RuntimeClass, or isn't configured with the WinRt or WinRtClassicComMix RuntimeClassType enumeration value.
Gets the trust level of an instance of the class specified by the Base
class template parameter.
STDMETHOD(
GetTrustLevel
)(_Out_ TrustLevel* trustLvl);
trustLvl
When this operation completes, the trust level of the current class object.
Always S_OK.