08-28-2009 10:07 AM
I've created a simple project (discretes_test.c) that is supposed to work as a simple test driver. The file under test (ri1260.c) is supposed to be linking up with a .dll file and a .lib file attached to discretes.h. Each of which are in the same directory as the project. When I comment out the call to the discretes.h function in ri1260.c everything works fine because its not doing anything but if I leave it in I get Fatal runtime error: Unknown source position, thread id 0x.... : A non-debuggable thread caused a "general protection" fault at address ... Any ideas would be helpful!
Thanks,
Julissa
08-28-2009 12:49 PM
Julissa:
Was the DLL you're trying to call from ri1260.c developed in CVI?
If it was, try debugging that project with your projects executable set as the External Process. See the CVI help on Debugging DLLs for more info.
08-28-2009 01:03 PM
ri1260.c and the associated dll is the cvi driver for a racal vxi mux card. While it has been a few years since I have worked with it I remember this driver being and absolute nightmare. We spent many hours stepping though the code to try and correct various issues. I know we found our cards did not return the correct ID string that the driver was expecting so we had fiddle with that. There were other issues that generated faults when we tried to close the session to the device and then re-open it. The best solution was to power cycle the chassis if you ever needed to close the driver out. After months of problems, in the end we tossed the equipment and installed a mux from another vendor. I can not think of another instrument that caused as much trouble for us as this one.
Best of luck.
08-28-2009 04:07 PM
08-31-2009 02:10 PM
Are you able to call functions in other Visual Studio DLL files?
Where did you get the .h file for the VS DLL? Is there maybe a problem with the calling convention?