is it possible to export a structure from the dll?
for example, in the DLL:
Code:
extern "C"
{
typedef struct __declspec(dllexport) __stdcall CreatedWindows {
HWND windowhandle[50];
BOOL Destroyed[50];
int LastIndex;
}*CreatedWindowPtr;
CreatedWindowPtr CreatedWindows;
}
EXE FILE:
Code:
typedef struct __declspec(dllexport) __stdcall CreatedWindowsPtr {
HWND windowhandle[50];
BOOL Destroyed[50];
int LastIndex;
}*CreatedWindowPtr;
CreatedWindowPtr CreatedWindows;
CreatedWindows=(CreatedWindowPtr)GetProcAddress(winDLL,"CreatedWindows");
the probem is if use it like
Code:
memset(CreatedWindows,0,sizeof(CreatedWindows));
CreatedWindows->LastIndex+=1;
it crashes with EAccessViolation
any ideas or?