LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Loading a VC++ Dll using a CIN?

Hi,
I am trying to develop a VC++ DLL that displays a dialog box. So instead of using a Call Library Funtion which can only call a single function I think I need to use a CIN in labview to call my DLL. I was wondering which approach is possible and how to achieve it if its the latter, thanks in advance,
Alex
0 Kudos
Message 1 of 2
(2,556 Views)
You should be able to call a dll function that calls other functions, this is not the issue. The thread which calls the dialog box must be apartment threaded. Since LabVIEW threads are initialized for a different thread model, a LabVIEW thread cannot directly call an MFC dialog. You would need to create a temporary thread, initialize it correctly, and then call the dialog box from this temporary thread. The original thread waits on the temporary thread to finish and then returns back to LabVIEW. This is similar to the way you would call an MFC dialog from TestStand. I have included an example that ships with TestStand which can be called from a LabVIEW Call Library Function. Its usually far easier to create your dialog boxes in LabVIEW than to work it this
way.
Message 2 of 2
(2,556 Views)