LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to change vi's ctrl from C/C++ DLLs in LabVIEW(在dll中执行过程中如何改变labview控件值等)

Solved!
Go to solution

Calling C/C++ DLLs  in LabView, and change Labview in DLLs.

For example,change panel control's value or run a vi and so on 

(Labview调用dll时,dll可能同步反馈数据,需要改变面板某个控制值,或运行某个vi,类似回调函数功能,如何实现)

0 Kudos
Message 1 of 4
(1,134 Views)

What is the question here?

Rolf Kalbermatter
My Blog
0 Kudos
Message 2 of 4
(1,087 Views)
If action is very long in DLL,how to real time change value of ctrl befor the end of the DLL
0 Kudos
Message 3 of 4
(1,044 Views)
Solution
Accepted by topic author iori_007

@iori_007 wrote:
If action is very long in DLL,how to real time change value of ctrl befor the end of the DLL

You can't access controls from inside a C DLL directly with any officially documented API. What you can do is however to call PostLVUserEvent to send an user event to your applications user event structure and let it respond to that. That requires of course that the call to the DLL function that blocks for this long time is not inside the same loop as your applications event loop and that you made your DLL function multithreading safe as you can't call it in the UI thread context, otherwise your GUI won't be able to update the change on the front panel until your function returns anyhow.

Rolf Kalbermatter
My Blog
0 Kudos
Message 4 of 4
(1,023 Views)