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



LinkBack URL
About LinkBacks




CornedBee