Measurement Studio for VC++

cancel
Showing results for 
Search instead for 
Did you mean: 

DLL that runs off another DLL

Hello guys,  I have a question that hopefully is not too hard.  I have written a DLL, call it A, DLL A calls functions from another DLL, calls it B, DLL B requires a directory call Config that is one directory above it in order to run.  How can I load this into a LabView, keep in mind that I already know how to load one DLL in to lapview.  

 

Below is a basic drawing to show what I mean.  In the diagram below, all i need to do is double click the executable and it will run.  The executable needs both the DLL and Config Directory above it in order to run.  My goal is to be able to use DLL A in labview.  The labview application would of-course take place of the executable.  Pleasseee help.  Thank you.     

 

 

 

 

18591i2C9026AACC14A66F

0 Kudos
Message 1 of 6
(6,615 Views)

Joey,


As I understand it, you are building a LabVIEW application and within this, you have a VI calling a DLL in LabVIEW that calls another DLL.  This second DLL needs to be in a specific directory relative to the first DLL.  Are you planning to distribute this application?

 

If so, what you can do is add the second .dll file to your project (the first one should be included as a dependency as long as you don't specify the path with a constant) in the project explorer and then create an installer with your original application.  In the installer properties you can choose the "Source Files" category and choose where you want your second .dll file to be installed to.

 

If you are not distributing this application, the first dll should be able to call into the second dll without issue as long as the path coded into the first dll is looking in the right location.

 

As well, check out these two KnowledgeBase articles for more information on calling dlls.

 

How Do I Determine What Calls Are Made by My DLL?

http://digital.ni.com/public.nsf/allkb/9F6E197ADF081277862569FB005E21CD?OpenDocument

 

Why Does the Application Builder Place a Copy of my DLL in the Data Folder?

http://digital.ni.com/public.nsf/allkb/55CD48508DB87ECD862575AE000A2A6D

 

Best Regards,

 

Chris LS

 

 

 

National Instruments
Applications Engineer

Visit ni.com/gettingstarted for step-by-step help in setting up your system.
0 Kudos
Message 2 of 6
(6,590 Views)

Hey thank you for the reply, I actually got it working.  I do wonder though,  my DLL that i build in C++ prints things to the Std output screen.  When I call a DLL node in labview, is there anyway to wire those output within the DLL functions to the standard ouput screen?

 

for example a function in my dll may look like this:

 

int add( int x, int y)

{

   cout<<"the total is: "<<(x +y)<<endl;

   return (x + y);

}

 

My guess is no is right?

0 Kudos
Message 3 of 6
(6,582 Views)

Joey,

 

Hmm.. as far as I know you only have access to the outputs.  If you have access to the code for the dll though, you could simply add that standard output to a string and then it would be accessible in LabVIEW.  Otherwise, it may also be possible to wrap your original dll in another dll and take your output from the first dll and make it an output.

 

Best,

 

Chris LS

National Instruments
Applications Engineer

Visit ni.com/gettingstarted for step-by-step help in setting up your system.
0 Kudos
Message 4 of 6
(6,566 Views)

i have a dll that i want to convert it to .so file so that i can use it in Suse Linux by calling it through Call library function.Suse linux version  that i use is 64 bit.so is there labview version of linux for 64 bit?cos i will be compiling the c program in linux which creates a .so file of 64 bit format, but i think i have labview of 32 bit,so can i call the 64 bit .so file in 32 labview linux version?

0 Kudos
Message 5 of 6
(6,465 Views)

 


@larshana wrote:

i have a dll that i want to convert it to .so file so that i can use it in Suse Linux by calling it through Call library function.Suse linux version  that i use is 64 bit.so is there labview version of linux for 64 bit?cos i will be compiling the c program in linux which creates a .so file of 64 bit format, but i think i have labview of 32 bit,so can i call the 64 bit .so file in 32 labview linux version?


STOP HIJACKING OTHER PEOPLE'S THREADS. This is like the 8th message you've posted on this. START YOUR OWN THREAD. We do not like board spammers.

 

0 Kudos
Message 6 of 6
(6,462 Views)