6 #ifndef _INC_cOSModImpl_H
7 #define _INC_cOSModImpl_H
40 AFX_EXTENSION_MODULE m_AFXExt;
44 bool OnProcessAttach2();
47 cOSModImpl(
const char* pszModuleName) noexcept;
52 return m_pszModuleName !=
nullptr && m_hModule !=
HMODULE_NULL;
55 virtual bool OnProcessAttach();
56 virtual void OnProcessDetach();
59 virtual bool DllMain(HINSTANCE hInstDll, DWORD dwReason);
60 #elif defined(__linux__)
73 #define COSMODULE_IMPL(N) __DECL_EXPORT BOOL APIENTRY DllMain(HINSTANCE hInstDll, DWORD dwReason, LPVOID) { return N::g_Module.DllMain(hInstDll,dwReason); }
74 #elif defined(__linux__)
75 #define COSMODULE_IMPL(N) CATTR_CONSTRUCTOR void _cdecl SOConstructor() { N::g_Module.SOConstructor(); } \
76 CATTR_DESTRUCTOR void _cdecl SODestructor() { g_Module.SODestructor(); }
#define GRAYCORE_LINK
Definition: GrayCore.h:47
#define HMODULE_NULL
Definition: cOSModule.h:31
Definition: cOSModImpl.h:25
HMODULE m_hModule
My HMODULE assigned to me when loaded. should be same as GetModuleHandleForAddr(&g_Module)
Definition: cOSModImpl.h:37
const char * m_pszModuleName
Just derive this from the file name ?
Definition: cOSModImpl.h:36
bool IsLoaded() const noexcept
Definition: cOSModImpl.h:50
< The main namespace for all Core functions.
Definition: GrayCore.cpp:14