LabWindows/CVI

取消
显示结果 
搜索替代 
您的意思是: 

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 项奖励
1 条消息(共 2 条)
3,114 次查看

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 项奖励
2 条消息(共 2 条)
3,111 次查看