1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49
|
// dynamic_mode_compatible.cpp : Defines the exported functions for the DLL application.
//
#include "stdafx.h"
#include "dynamic_mode_compatible.h"
#include "MainApp.h"
// This is an example of an exported variable
DYNAMIC_MODE_COMPATIBLE_API int ndynamic_mode_compatible=0;
// This is an example of an exported function.
DYNAMIC_MODE_COMPATIBLE_API int fndynamic_mode_compatible(void)
{
return 42;
}
// This is the constructor of a class that has been exported.
// see dynamic_mode_compatible.h for the class definition
Cdynamic_mode_compatible::Cdynamic_mode_compatible()
{
return;
}
////////////////////////////////////////////////////////////////////////////////
static MainApp* mainApp = NULL;
DYNAMIC_MODE_COMPATIBLE_API Cardinal Initialize (struct TPluginData vPluginData)
{
MessageBox(NULL, L"Initialize was called", L"test from DLL", MB_OK);
if(!mainApp)
{
mainApp = new MainApp();
mainApp->initialize();
mainApp->showMagnifier();
}
return 0;
}
DYNAMIC_MODE_COMPATIBLE_API void Finalize (void)
{
MessageBox(NULL, L"Finalize was called", L"test from DLL", MB_OK);
if(mainApp)
{
delete mainApp;
mainApp = NULL;
}
}
|