From Saturday, Nov 23rd 7:00 PM CST - Sunday, Nov 24th 7:45 AM CST, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

call Visual Basic dlls

I have a dll made in Visual Basic, and I need to call it in a LabView application.
0 Kudos
Message 1 of 2
(4,092 Views)
Any dll can be called within LabVIEW with the Call Library Node.
VB DLLs often embed ActiveX type libraries in them, and don't export any symbols. These DLLs are intended to be called via activeX, not at normal DLLs. Try to call your DLL by registering it with the system and then using ActiveX calls.
Treat them as ActiveX servers (use activeX reference > browse > and select your VB DLL.

Example1:
The attached file contains a Visual Basic project that creates an ActiveX DLL and a LabVIEW VI that uses the properties and methods in the DLL. Be sure to register the DLL with command:

REGSVR32 Project1.dll

In order to open the project file, you must have Visual Basic 5 Service Pack 3 or better.

Example2:
This example illustrates how to p
ass an array from a Visual Basic DLL to LabVIEW through ActiveX. Visual Basic makes ActiveX DLLs, so they must be aqccessed through ActiveX methods and properties in LabVIEW. The DLL must also be register on the computer for LabVIEW to detect the active X DLL. The DLL is provided, so register it on the computer with Start>>Run and type "regsvr32 C:\temp\VBArray2LV.dll" or whatever the path is. Then make sure to reconnect the ActiveX reference in LabVIEW. Note: Visual Basic integers are 8 bit integers, so make sure to use the I8 type when converting to G code.

Zvezdana S.
National Instruments
Download All
Message 2 of 2
(4,092 Views)