Function Help w/ DLL Script
I recently just switch to TC 8.7 from 7.52. I have all my projects written in 7.52 and surely all I had to do was convert the files (which should work properly) except I can't figure out why 8.7 is giving me this error. I tried a couple of things, but can't seem to figure it out. Any help would be appreciated. I get this "An exception occurred: 0xC0000005; class: ; description: ''. Here is the function:
function WriteToDevice(GPIBAdd, Command)
{
var CMD = DLL["New"]("LPSTR", 100);
var DLLLocation = "C:\\Users\\edarriaga\\Crown\\Testing\\TestComplete\\LVLib\\DLLS\\VISA\\VISA.dll";
CMD.Text = Command;
//Define DLL
DLLFile = DLL["DefineDLL"]("VISA");
//Declare the DLL's function's Type and paramaters
DLLFile["DefineProc"]("VisaWriteOnly", vt_lpstr, vt_lpstr, vt_void);
//Load The DLL Into Memory
Lib = DLL["Load"](DLLLocation);
Delay(100);
//Call Happens here
Lib["VisaWriteOnly"](GPIBAdd, CMD); //eror happens here
}
Thanks in advance!