LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

How to pass a parameter from an executable code to a DLL?

Hi,

 

I have an executable (.exe) code that runs a GUI. This executable accesses a DLL for running a test.

I would like to add a new parameter to the GUI, and pass that parameter to the .dll as a test selection parameter.

 

Is there a way to pass a parameter (control data) from the GUI (.exe file) to a DLL (.dll)?

 

Thanks for your help.

 

-LVLV

0 Kudos
Message 1 of 2
(2,984 Views)

Most DLL functions accept parameters from the calling EXE.  That's what makes them useful as part of a Library (the last L in DLL).

 

You define a function in your DLL with input parameters.  When you call that function from your EXE, you pass it the parameter it needs.

 

CVI ships with multiple sample DLL projects, all of which pass parameters from the EXE to the DLL.  The easiest one to start with is cvidll.cws.  DLLFunc2() in cvidll.c takes a parameter from the calling EXE.  Take a look.

0 Kudos
Message 2 of 2
(2,981 Views)