ReactOS 0.4.15-dev-7942-gd23573b
ATL::CAtlComModule Class Reference

#include <atlbase.h>

Inheritance diagram for ATL::CAtlComModule:
Collaboration diagram for ATL::CAtlComModule:

Public Member Functions

 CAtlComModule ()
 
 ~CAtlComModule ()
 
HRESULT RegisterServer (BOOL bRegTypeLib=FALSE, const CLSID *pCLSID=NULL)
 
HRESULT UnregisterServer (BOOL bUnRegTypeLib, const CLSID *pCLSID=NULL)
 
void Term ()
 
void ExecuteObjectMain (bool bStarting)
 

Additional Inherited Members

- Public Attributes inherited from ATL::_ATL_COM_MODULE70
UINT cbSize
 
HINSTANCE m_hInstTypeLib
 
_ATL_OBJMAP_ENTRY ** m_ppAutoObjMapFirst
 
_ATL_OBJMAP_ENTRY ** m_ppAutoObjMapLast
 
CComCriticalSection m_csObjMap
 

Detailed Description

Definition at line 597 of file atlbase.h.

Constructor & Destructor Documentation

◆ CAtlComModule()

ATL::CAtlComModule::CAtlComModule ( )
inline

Definition at line 600 of file atlbase.h.

601 {
602 GetModuleHandleExW(GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS, (LPCWSTR)this, &m_hInstTypeLib);
603
604 m_ppAutoObjMapFirst = &__pobjMapEntryFirst + 1;
605 m_ppAutoObjMapLast = &__pobjMapEntryLast;
606 if (FAILED(m_csObjMap.Init()))
607 {
608 ATLASSERT(0);
610 return;
611 }
612 cbSize = sizeof(_ATL_COM_MODULE);
613 }
#define ATLASSERT(x)
Definition: CComVariant.cpp:10
static bool m_bInitFailed
Definition: atlcore.h:193
BOOL WINAPI GetModuleHandleExW(IN DWORD dwFlags, IN LPCWSTR lpwModuleName OPTIONAL, OUT HMODULE *phModule)
Definition: loader.c:866
#define FAILED(hr)
Definition: intsafe.h:51
_ATL_COM_MODULE70 _ATL_COM_MODULE
Definition: atlbase.h:172
HINSTANCE m_hInstTypeLib
Definition: atlbase.h:167
_ATL_OBJMAP_ENTRY ** m_ppAutoObjMapLast
Definition: atlbase.h:169
_ATL_OBJMAP_ENTRY ** m_ppAutoObjMapFirst
Definition: atlbase.h:168
CComCriticalSection m_csObjMap
Definition: atlbase.h:170
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185

◆ ~CAtlComModule()

ATL::CAtlComModule::~CAtlComModule ( )
inline

Definition at line 615 of file atlbase.h.

616 {
617 Term();
618 }

Member Function Documentation

◆ ExecuteObjectMain()

void ATL::CAtlComModule::ExecuteObjectMain ( bool  bStarting)
inline

Definition at line 651 of file atlbase.h.

652 {
653 for (_ATL_OBJMAP_ENTRY **iter = m_ppAutoObjMapFirst; iter < m_ppAutoObjMapLast; iter++)
654 {
655 if (!*iter)
656 continue;
657
658 (*iter)->pfnObjectMain(bStarting);
659 }
660 }

Referenced by ATL::CAtlDllModuleT< T >::CAtlDllModuleT(), ATL::CAtlExeModuleT< T >::CAtlExeModuleT(), ATL::CAtlDllModuleT< T >::~CAtlDllModuleT(), and ATL::CAtlExeModuleT< T >::~CAtlExeModuleT().

◆ RegisterServer()

HRESULT ATL::CAtlComModule::RegisterServer ( BOOL  bRegTypeLib = FALSE,
const CLSID pCLSID = NULL 
)
inline

Definition at line 620 of file atlbase.h.

621 {
622 return AtlComModuleRegisterServer(this, bRegTypeLib, pCLSID);
623 }
HRESULT WINAPI AtlComModuleRegisterServer(_ATL_COM_MODULE *mod, BOOL bRegTypeLib, const CLSID *clsid)
Definition: atlbase.h:1820

Referenced by ATL::CAtlModuleT< T >::RegisterServer().

◆ Term()

void ATL::CAtlComModule::Term ( )
inline

Definition at line 630 of file atlbase.h.

631 {
632 if (cbSize != 0)
633 {
634 for (_ATL_OBJMAP_ENTRY **iter = m_ppAutoObjMapFirst; iter < m_ppAutoObjMapLast; iter++)
635 {
636 _ATL_OBJMAP_ENTRY *ptr = *iter;
637 if (!ptr)
638 continue;
639
640 if (!ptr->pCF)
641 continue;
642
643 ptr->pCF->Release();
644 ptr->pCF = NULL;
645 }
647 cbSize = 0;
648 }
649 }
#define NULL
Definition: types.h:112
nsrefcnt Release()
static PVOID ptr
Definition: dispmode.c:27

Referenced by ~CAtlComModule().

◆ UnregisterServer()

HRESULT ATL::CAtlComModule::UnregisterServer ( BOOL  bUnRegTypeLib,
const CLSID pCLSID = NULL 
)
inline

Definition at line 625 of file atlbase.h.

626 {
627 return AtlComModuleUnregisterServer(this, bUnRegTypeLib, pCLSID);
628 }
HRESULT WINAPI AtlComModuleUnregisterServer(_ATL_COM_MODULE *mod, BOOL bRegTypeLib, const CLSID *clsid)
Definition: atlbase.h:1854

Referenced by ATL::CAtlModuleT< T >::UnregisterServer().


The documentation for this class was generated from the following file: