LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

LV 5.1: Secondary DLL not found, path to working DLL must be re-specified every time

Solved!
Go to solution

I have a written a little VI (my first!) to send a string to a DLL that we wrote:

 

SendStringToDACQ.vi 

 

Our DLL exports two functions, DACQInputMsg() and DACQOutputMsg(), that receive and output strings, respectively. DACQ.dll also calls PIDebug.dll, that we use to write debugging information to the Windows debug stream.

 

Both DACQ.dll and PIDebug.dll live in C:\Program Files\Pulse20\

 

The VI _always_ complains when I first load it, that PIDebug.dll failed to load, and the VI is then un-executable. If I edit the Call Library Function, I see that the path that I had entered as C:\Program Files\Pulse20\dacq.dll has been replaced with ..\..\dacq.dll. If I just retype it as C:\Program Files\Pulse20\dacq.dll and click OK, it is still unexecutable. But if I then click Browse (which opens up C:\Program Files\Pulse20\) then click OK, then everything works.

 

But if I save it, close LabVIEW, and relaunch it, I have to do it all over again.

 

Note that I clicking Browse doesn't change what LabVIEW sees as the path to the DLL. It just seems to "wake" something up and actually load the DLL (and possibly the DLL it depends on?). The actual function call, calling convention, and arguments are correct because everything works after I re-specify and re-browse to the DLL.

 

Yes, we're using LabVIEW 5.1. If I can get a few things fixed and finish this proof-of-concept, then maybe I can get approval to upgrade!

 

Thanks! 

0 Kudos
Message 1 of 4
(2,521 Views)

Water,

 

       Do you get any error code when the second dll fails to load? Error codes are very useful. I will try to take a look at your code but a lot of things have changed since LV 5.1 so I don't even know if I can open it in LV 8.6. You might look at the free 30-day trial of LabVIEW 8.6 (link is here). This should be more than enough time for your proof of concept to be completed and it will get you more help on the forums because very few people still have LV 5.1 to be able to open your VIs (its a great version though Smiley Happy). I will let you know if I find anything. Cheers!!

 

G-Money

 

Message 2 of 4
(2,499 Views)
Solution
Accepted by topic author TheWaterbug

Sorry about the red herring, it was PEBCAK. Putting C:\Program Files\Pulse20 into the Windows Environment variables fixed the problem.

 

Sorry to bother you all. 

0 Kudos
Message 3 of 4
(2,491 Views)

TheWaterbug,

 

          No problem!! Happy Wiring!!

0 Kudos
Message 4 of 4
(2,487 Views)