Share via


Module Class

Represents a collection of related objects.

template<
   ModuleType moduleType
>
class Module;

template<>
class Module<InProc> : public Details::ModuleBase;

template<>
class Module<OutOfProc> : public Module<InProc>;

Parameters

  • moduleType
    A combination of one or more ModuleType enumeration values.

Members

Protected Classes

Name

Description

Module::GenericReleaseNotifier Class

Invokes an event handler when the last object in the current module is released. The event handler is specified by on a lambda, functor, or pointer-to-function.

Module::MethodReleaseNotifier Class

Invokes an event handler when the last object in the current module is released. The event handler is specified by an object and its pointer-to-a-method member.

Module::ReleaseNotifier Class

Invokes an event handler when the last object in a module is released.

Public Constructors

Name

Description

Module::~Module Destructor

Deinitializes the current instance of the Module class.

Protected Constructors

Name

Description

Module::Module Constructor

Initializes a new instance of the Module class.

Public Methods

Name

Description

Module::Create Method

Creates an instance of a module.

Module::DecrementObjectCount Method

Decrements the number of objects tracked by the module.

Module::GetActivationFactory Method

Gets an activation factory for the module.

Module::GetClassObject Method

Retreives a cache of class factories.

Module::GetModule Method

Creates an instance of a module.

Module::GetObjectCount Method

Retrieves the number of objects managed by this module.

Module::IncrementObjectCount Method

Increments the number of objects tracked by the module.

Module::RegisterCOMObject Method

Registers one or more COM objects so other applications can connect to them.

Module::RegisterObjects Method

Registers COM or Windows Runtime objects so other applications can connect to them.

Module::RegisterWinRTObject Method

Registers one or more Windows Runtime objects so other applications can connect to them.

Module::Terminate Method

Causes all factories instantiated by the module to shut down.

Module::UnregisterCOMObject Method

Unregisters one or more COM objects, which prevents other applications from connecting to them.

Module::UnregisterObjects Method

Unregisters the objects in the specified module so that other applications cannot connect to them.

Module::UnregisterWinRTObject Method

Unregisters one or more Windows Runtime objects so that other applications cannot connect to them.

Protected Methods

Name

Description

Module::Create Method

Creates an instance of a module.

Protected Data Members

Name

Description

Module::objectCount_ Data Member

Keeps track of how many classes have been created with the Make function.

Module::releaseNotifier_ Data Member

Holds a pointer to a ReleaseNotifier object.

Macros

ActivatableClass

Populates an internal cache that contains a factory that can create an instance of the specified class. This macro specifies default factory and group ID parameters.

ActivatableClassWithFactory

Populates an internal cache that contains a factory that can create an instance of the specified class. This macro enables you to specify a particular factory parameter.

ActivatableClassWithFactoryEx

Populates an internal cache that contains a factory that can create an instance of the specified class. This macro enables you to specify particular factory and group ID parameters.

Inheritance Hierarchy

ModuleBase

Module

Module

Requirements

Header: module.h

Namespace: Microsoft::WRL

See Also

Reference

Microsoft::WRL Namespace