I am working on some legacy software (VB6) on a Windows 7 machine. I was adding some code totally unrelated to my GPIB issue. After I updated my code, I ran it in the VB6 IDE and had NO issues whatsoever. This includes the area in which GPIB is utilized. However, once I compiled it, it faults out with a "CIEEE: No GpibCard lGpib0 = -1". This is code that was implemented by a previous engineer in the past due to some issue he was having with the executable (he is no longer around for me to inquire what the issue was).
The call that is creating the check for the "-1" is: lGpib0 = ibfind32(ByVal "GPIB0").
Which is derived from: Declare Function ibfind32 Lib "Gpib-32.dll" Alias "ibfindA" (sstr As Any) As Long
When I trap lGpib0 via a VB6 label and run it in the VB6 IDE, I get a "31000" instead of the "-1" and the code runs fine.
I've tried driver updates, commenting out code, faking the results all with the same results. When I run the tracer, it says that GPIB0 has the incorrect address. Yet nothing has been changed by an individual and I can only assume it was a corruption of some sort. I can find no way via MAX to check or change the address of GPIB0 to ensure it is correct. And why would it work OK in the VB6 IDE and not as an executable???
I appreciate any and all assistance or recommendations. I am about out of any and all ideas on how to correct this issue and I have to get this test stand back on-line ASAP.
Thanks