CFx SDK Documentation  2020SP3
Macros
FxInit.h File Reference
#include <RxDynamicModule.h>
#include "FxString.h"
#include "FxSystemServices.h"

Go to the source code of this file.

Macros

#define FX_DEFINE_DYNAMIC_MODULE(_UserModuleClass, _Application)
 

Macro Definition Documentation

◆ FX_DEFINE_DYNAMIC_MODULE

#define FX_DEFINE_DYNAMIC_MODULE (   _UserModuleClass,
  _Application 
)
Value:
static OdRxModule* g_pSingletonModule = 0; \
extern "C" { \
__declspec(dllexport) OdRxModule* odrxCreateModuleObject(HMODULE& hModule) \
{ \
if(!g_pSingletonModule) \
{ \
CFxString sProgramName = GetFxSystemServices()->GetHostAppServices()->program(); \
if( sProgramName.equalNoCase( CFxString::from_ansi_str( _Application ) ) ) \
{ \
g_pSingletonModule = OdRxWin32Module<_UserModuleClass >::createModule(hModule); \
} \
hModule = 0; \
} \
return g_pSingletonModule; \
} \
__declspec(dllexport) void odrxGetAPIVersion(int& nMajorVersion, int& nMinorVersion, \
int& nMajorBuildVersion, int& nMinorBuildVersion) \
{ \
nMajorVersion = TD_MAJOR_VERSION; \
nMinorVersion = TD_MINOR_VERSION; \
nMajorBuildVersion = TD_MAJOR_BUILD; \
nMinorBuildVersion = TD_MINOR_BUILD; \
} \
}

Description: Creates the entry point function for an ARES custom application. It will be checked if the core application can load this custom application. Usage: FX_DEFINE_DYNAMIC_MODULE( MyModule, "ARES Commander Edition" );

Definition at line 32 of file FxInit.h.

CFxSystemServices::GetHostAppServices
virtual CFxHostAppServices * GetHostAppServices()=0
CFxString::from_ansi_str
static CFxString from_ansi_str(const char *data)
GetFxSystemServices
DDKERNEL_API CFxSystemServices * GetFxSystemServices()
TD_MINOR_VERSION
#define TD_MINOR_VERSION
Definition: TDVersion.h:85
TD_MAJOR_BUILD
#define TD_MAJOR_BUILD
Definition: TDVersion.h:86
TD_MINOR_BUILD
#define TD_MINOR_BUILD
Definition: TDVersion.h:87
OdRxModule
Definition: RxModule.h:45
TD_MAJOR_VERSION
#define TD_MAJOR_VERSION
Definition: TDVersion.h:84
OdDbHostAppServices::program
virtual const OdString program()