LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

call vb dll

Hi there..
 
I have a comm.dll created from visual basic 6.0.. How do I call it out from VI? I used Call Library Function Node and from the Function Name list down box, I got 4 items which are DllCanUnloadNow, DllGetClassObject, DllRegisterServer, DllUnregisterServer.. After choosing either one of the option, what is my next step should I do? I'm really not familiar with those dll things.. I hope you all can give me a details guide on calling this dll. Thanks in advance.
 
Regards
Chong
0 Kudos
Message 1 of 8
(5,490 Views)

hi there

for COM objects you have to use the automation. on the FP open the controls palette and go to Refnum->Automation Refnum. On the BD use the functions from the Commmunication->ActiveX palette. see attachment. there are some examples using COM and take a look at the LV help files.

Best regards
chris

CL(A)Dly bending G-Force with LabVIEW

famous last words: "oh my god, it is full of stars!"
0 Kudos
Message 2 of 8
(5,487 Views)

Hi .. thanks for the reply

Please take a look at these 2 pictures.. How can I call the function to show the form2 out? Any advise? Thanks??

 

Download All
0 Kudos
Message 3 of 8
(5,485 Views)
Here are links to some documents about VB dlls and function calls using ActiveX:

http://digital.ni.com/public.nsf/websearch/138C65271FC4E2AE86256ED300549751?OpenDocument
http://zone.ni.com/devzone/conceptd.nsf/webmain/C43F8D1DDC1F0E2386256E5C000555F1
http://digital.ni.com/public.nsf/websearch/A51C520CED4FB5F98625707B006CC32F?OpenDocument
http://digital.ni.com/public.nsf/websearch/44E40ACF1644DB77862562990054D672?OpenDocument
http://zone.ni.com/devzone/conceptd.nsf/webmain/7f41004ee990d4da86256a9d0064d522
http://zone.ni.com/devzone/devzoneweb.nsf/Opendoc?openagent&1744411D9B6C5820862567C2006DC236



Doug M
Applications Engineer
National Instruments
For those unfamiliar with NBC's The Office, my icon is NOT a picture of me 🙂
0 Kudos
Message 4 of 8
(5,457 Views)

Thanks for the reply. I've already read through all the documentation that you provided but still haven't found a way to call the user form out from the VB dll. Could you please guide me on this? Thanks..

 

Regards

Chong

Message 5 of 8
(5,447 Views)
I'm afraid I'm not sure what you are asking. The VB code you show is a function call that invokes the form. The LV code shows you opening the class and calling the function...looks like it's doing what you want.

What is it that you want to do exactly?
0 Kudos
Message 6 of 8
(5,411 Views)

I want to load the form in NI as though it was in VB. The method that I used (previous jpg attachment) was not successful to call the form out.. May I know is it possible to do so? Thanks

0 Kudos
Message 7 of 8
(5,399 Views)
I'm afraid I don't know enough about VB6 forms to be able to say. You should be able to wrap up calls to create forms and access them through LV. You might want to create a new thread in DevZone with that specific question - someone out there probably can help you.

Another option is to move to VB.NET instead. If you create a WinForm control (VB.NET version of Forms), you can actually embed them onto your VI front panel (LV 8.0 and later).
0 Kudos
Message 8 of 8
(5,381 Views)