LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Creating a Labview DLL to attach and detach Citadel databases

I'm sure this has a real simple solution, but I can't seem to find it ;p, but here goes.

I'm creating a Labview DLL to detach and attach Citadel databases. I need this DLL to run from an Excel Macro, i've create the DLL, but it doesn't seem to run. If I remove the call to detach or attach the database from the DLL it runs fine. Obviously the DLL will look for the Detach or attach vi, but even putting the DLL in the run-time directory doesn't help. How do you link this DLL to find the run-time and load the vi?

I'm running Labview 7.1

Thanks in Advance!

- Nick
0 Kudos
Message 1 of 4
(2,870 Views)
Hi Nick,

I'm not sure that I understand your question, so please describe further what you mean with "detach and attach" the database. Are you referring to the "DLL_PROCESS_ATTACH", "DLL_THREAD_DETACH" etc. cases that are part of the DLL? What VIs are you referring to?

Can you call the DLL including the Citadel calls from a LabVIEW VI using the Call Library Function Node?
Can you call the DLL including the Citadel calls from another programming language (C++, VB etc.)?

Please submit the VI that you build into a DLL, and give me further information about what you are trying to accomplish, thanks.
- Philip Courtois, Thinkbot Solutions

Thinkbot Solutions
0 Kudos
Message 2 of 4
(2,848 Views)
Hi Philip,

Thanks for the reply, I'm using the "Detach Datatabase.vi". I'll include the Lavbiew Vi I created, the build file and the vb 6 code.

The DLL I created, simply takes in a few strings, creates a Citadel database path and tries to detach a citadel database using the "Detach Database.vi".I also put a return string to for debugging purposes. Now, when I try running the DLL from VB, it doesn't run the "Detach Database.vi" in the DLL and the string comes back as null. If I remove the "Detach Database.vi" and the DLL simply returns a String it works fine.

Now, When I build the DLL with the "Detach Database.vi" the output says to put the files in the Labview Run-time directory, but that doesn't work either. Obviously the DLL requires the Detach Database.vi, but it looks like it can't find it. I also tried adding the VI to the build file with no success.

Hope that clears it up!

Thanks,

- Nick
0 Kudos
Message 3 of 4
(2,844 Views)
Hi Nick,

Are you only seing the behavior (that the Detach Database VI is not run) when you build a DLL, or do you also see it when creating an executable?
- Philip Courtois, Thinkbot Solutions

Thinkbot Solutions
0 Kudos
Message 4 of 4
(2,815 Views)