11-03-2008 04:13 AM
Hello,
I am a new starter in C#.net. I have a ActiveX control dll (NI vision control -> CWIMAQ). I need to call the dll functions in Labview. I searched for the articles about this topic. everybody talking about Single thread and register the dll. I have no idea about these things. Any body can give me a hand. How it works?
Thanks for any info
best regards.
Solved! Go to Solution.
11-03-2008 05:56 AM
To use an ActiveX control in LabVIEW you place an ActiveX container on the front panel and browse for the control to put it in. Then use property nodes and/or invoke nodes from the ActiveX palette to set properties and call methods.
To register a DLL open a command prompt, navigate to the folder where your ActiveX control is, normally the system32 folder of Windows, and type
regsvr32 <name of dll file>.
In LabVIEW use Help >> Find Examples... and type in the Search tab ActiveX.
11-03-2008 08:26 AM
Thanks for the info.
I think i mislead the qustion. I am sorry.
I created a C# .net dll with a Form and a ShowForm() function to display the Form. I can call the ShowForm() function from Labview and display the Form without problem.
Now I add a NI Vision control (CWIMAQ) to the Form, rebuild it. It doesnt work any more. The error msg was: "he ActiveX-Control adbf7240-2b8d-11d1-b5c5-00a024d63828 cannot instantiate, the current Thread is not Singlethread-Apartment"
Any one can help with this error?
thanks and best regards
11-04-2008 01:02 AM
11-04-2008 02:50 AM
02-04-2009 02:33 AM
Hello,
I had a problem using activeX dll.
I made a dll ActiveX using vb6, it works properly with my development computer with a Labview test program.
I copy this dll, i used regsrv32 and it answered "register successfully". I try my test program (i verified if my refnum are linked to this dll): it doesn't work.
I unregistred and registred again.
Still doesn't work.
Each time, i try the software twice before unregistering and registering this dll activeX
It occurs these two errors
-2147221164
Class not registred
in test.vi
-2147417851
The server thrown an exception
in test.vi
Can you help me please?
02-04-2009 02:35 AM