Windows apps
Collapse the table of content
Expand the table of content
Information
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.

ClassFactory Class

 

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 ClassFactory Class.

Implements the basic functionality of the IClassFactory interface.

template <  
   typename I0 = Details::Nil,  
   typename I1 = Details::Nil,  
   typename I2 = Details::Nil  
>  
class ClassFactory : public Details::RuntimeClass<  
   typename Details::InterfaceListHelper<IClassFactory,   
   I0,   
   I1,   
   I2,   
   Details::Nil>::TypeT,   
   RuntimeClassFlags<ClassicCom | InhibitWeakReference>,   
      false>;  

Parameters

I0
The zeroth interface.

I1
The first interface.

I2
The second interface.

Utilize ClassFactory to provide a user-defined factory implementation.

The following programming pattern demonstrates how to use the Implements structure to specify more than three interfaces on a class factory.

struct MyFactory : ClassFactory<Implements<I1, I2, I3>, I4, I5>

Public Constructors

NameDescription
ClassFactory::ClassFactory Constructor

Public Methods

NameDescription
ClassFactory::AddRef MethodIncrements the reference count for the current ClassFactory object.
ClassFactory::LockServer MethodIncrements or decrements the number of underlying objects that are tracked by the current ClassFactory object.
ClassFactory::QueryInterface MethodRetrieves a pointer to the interface specified by parameter.
ClassFactory::Release MethodDecrements the reference count for the current ClassFactory object.

I0

ChainInterfaces

I0

RuntimeClassBase

ImplementsHelper

DontUseNewUseMake

RuntimeClassFlags

RuntimeClassBaseT

RuntimeClass

ClassFactory

Header: module.h

Namespace: Microsoft::WRL

Microsoft::WRL Namespace
RuntimeClassType Enumeration

Show:
© 2018 Microsoft