Gray C++ Libraries  0.0.2
A set of C++ libraries for MSVC, GNU on Windows, WinCE, Linux
Gray::cOSModImpl Class Reference

#include <cOSModImpl.h>

Inheritance diagram for Gray::cOSModImpl:
GrayLib::cOSModDyn

Public Member Functions

 cOSModImpl (const char *pszModuleName) noexcept
 
virtual ~cOSModImpl ()
 
bool IsLoaded () const noexcept
 
virtual bool OnProcessAttach ()
 
virtual void OnProcessDetach ()
 

Public Attributes

const char * m_pszModuleName
 Just derive this from the file name ? More...
 
HMODULE m_hModule
 My HMODULE assigned to me when loaded. should be same as GetModuleHandleForAddr(&g_Module) More...
 

Detailed Description

My implementation of a DLL/SO. _WINDLL Must be only one of these in a single link space for DLL/SO. So it is not a true cSingletonStatic. Always static allocated. NEVER heap or Stack allocated. Assume g_Module gets defined for the DLL/SO. On some derived class based on cOSModImpl named g_Module. e.g. cOSModImpl g_Module("ModuleName");

Todo:
Support _WIN32 DLL_THREAD_ATTACH and DLL_THREAD_DETACH ? Similar to MFC AFX_EXTENSION_MODULE DLLModule or CAtlDllModuleT This might have a corresponding cXObjModulePtr. cIUnkPtr can be used alternatively.

Constructor & Destructor Documentation

◆ cOSModImpl()

Gray::cOSModImpl::cOSModImpl ( const char *  pszModuleName)
noexcept

◆ ~cOSModImpl()

Gray::cOSModImpl::~cOSModImpl ( )
virtual

Member Function Documentation

◆ IsLoaded()

bool Gray::cOSModImpl::IsLoaded ( ) const
inlinenoexcept

◆ OnProcessAttach()

bool Gray::cOSModImpl::OnProcessAttach ( )
virtual

◆ OnProcessDetach()

void Gray::cOSModImpl::OnProcessDetach ( )
virtual

Member Data Documentation

◆ m_hModule

HMODULE Gray::cOSModImpl::m_hModule

My HMODULE assigned to me when loaded. should be same as GetModuleHandleForAddr(&g_Module)

◆ m_pszModuleName

const char* Gray::cOSModImpl::m_pszModuleName

Just derive this from the file name ?


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