javier - 2013-10-17

Hi,
for my researches I need to work with several physic engines. Currently I get stuck. When i try to run some sample application that wants to use libpal_ode(d).dll, the application will stop working at the following point:
pt2CreateGroupFunction fpg = (pt2CreateGroupFunction) DYNLIB_GETSYM(/(HMODULE)/hInst,"Group_CreateComponent");
if (fpg == NULL) {
//LOG(SWARNING,"%s does not contain a valid factory group component",filename);
} else {
pt2SetFactory fps = (pt2SetFactory) DYNLIB_GETSYM(hInst,"Group_SetFactory");
if (fps)
fps(factoryPointer,factoryInfoPointer);
int num = (int )fpg(-1); //get the number of components in here. <--- CRASH!
The application is trying to execute a export function from libpal_ode(d).dll trough a function pointer. But the following error message occurs
Error Msg:
Unhandled exception at 0x524fec61 in palbeginnerd.exe: 0xC0000005: Access violation reading location 0x00000030.
The workspace I currently working is:
- Windows XP
- IDE VS9 2008
the strange thing is, when I remove the libpal_ode(d).dll from the directory where the executable is running, anything is running fine. Only that dll makes trouble.
I hope you guys can help me to fix that issue.