Windows apps
Collapse the table of content
Expand the table of content
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

CreateActivationFactory Function


The new home for Visual Studio documentation is Visual Studio 2017 Documentation on

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

Creates a factory that produces instances of the specified class that can be activated by the Windows Runtime.

template<typename Factory>  
   inline HRESULT STDMETHODCALLTYPE CreateActivationFactory(  
      _In_ unsigned int *flags,        _In_ const CreatorMap* entry,   
      REFIID riid,   
     _Outptr_ IUnknown **ppFactory) throw();  


A combination of one or more RuntimeClassType enumeration values.

Pointer to a CreatorMap that contains initialization and registration information about parameter riid.

Reference to an interface ID.

If this operation completes successfully, a pointer to an activation factory.

S_OK if successful; otherwise, an HRESULT that indicates the error.

An assert error is emitted if template parameter Factory doesn't derive from interface IActivationFactory.

Header: module.h

Namespace: Microsoft::WRL

Microsoft::WRL::Wrappers::Details Namespace

© 2017 Microsoft