Matlab DLL error


I’ve been using a XEM3001v2 FPGA for several months without problems on Matlab R2011b (32-bit) with an old FrontPanel version (// Rev: 424 $Date: 2006-12-18 20:27:54). However, I recently wanted to hook-up a second FPGA which was a XEM6001 model, so I had to upgrade the FrontPanel version (v3 does not support XEM6001 models). As soon as I upgraded the DLL, several methods became broken, such as okFrontPanel_GetDeviceListSerial, okFrontPanel_GetSerialNumber and others.

If I try the following line:

[x, serial] = calllib('okFrontPanel', 'okFrontPanel_GetSerialNumber', xptr, ' ');

after initializing the xptr, I get following error message:

[CODE]Error using calllib
No method with matching signature.

Error in ok_getdevicelistv4 (line 41)
[x, serial] = calllib(‘okFrontPanel’, ‘okFrontPanel_GetSerialNumber’, xptr, ’ ');[/CODE]

In the end, I got okFrontPanel_GetSerialNumber to work by not setting typedef void* okFrontPanel_HANDLE; to typedef unsigned long okFrontPanel_HANDLE; in the DLL header file, so I have been able to connect to the XEM6001 board and retrieve its serial number. However, because I did not change the pointer type to unsigned long from void* I can only run the script once before i get segmentation violation errors and have to restart my computer.
In either case (with and without the change from void to unsigned long) okFrontPanel_GetDeviceListSerial still fails every time with the new version (4.0.8). I can live without the GetDeviceListSerial method, but unfortunately I cannot live with segmentation errors and/or being unable to access my XEM6001 board. Does anyone have a solution and/or suggestion?

Supplementary information: OS: Windows 7 Professional 64-bit, Matlab R2011b 32-bit, FrontPanel 4.0.8 32-bit (Rev: 1032).

With kind regards,