My new Code:
Main.cpp:
#include "stdafx.h"
#include <stdio.h>
#include "main.h"
#include <stdlib.h>
#include <d3d9.h>
#include <math.h>
GlobStruct* g_pGlob = NULL;
BOOL APIENTRY DllMain( HANDLE hModule,
DWORD ul_reason_for_call,
LPVOID lpReserved
)
{
return TRUE;
}
#define MYCOMMAND __declspec ( dllexport )
HINSTANCE Core;
void (PASCAL *_DOT)(int x,int y);
MYCOMMAND void ReceiveCoreDataPtr (LPVOID _Core)
{
g_pGlob=(GlobStruct*)_Core;
Core = GetModuleHandle("DBProCore.dll");
}
#ifdef __cplusplus
extern "C" {
#endif
MYCOMMAND void Testit()
{
(FARPROC &) _DOT=GetProcAddress(g_pGlob->g_Basic2D, "?Dot@@YAXHH@Z%X,Y");
(_DOT)(10,10);
}
#ifdef __cplusplus
}
#endif
main.h:
//
// Header File
//
// Common Includes
#include "globstruct.h"
#include "windows.h"
// Define macro
#define MYCOMMAND __declspec ( dllexport )
// Constructor Functions (optional)
MYCOMMAND void Constructor ( void );
MYCOMMAND void Destructor ( void );
MYCOMMAND void ReceiveCoreDataPtr ( LPVOID pCore );
// Do not decorate DLL-function-names
extern "C"
{
// My Commands and Functions
MYCOMMAND void Testit();
}
It still does not work.