09-22-2010 08:22 PM
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
09-22-2010 09:25 PM
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.