LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Can I Calling DLL(built in CVI containment UIR) in VB ?

Hi.
I made dll in CVI for my applications containment UIR.
And I using my dll in CVI very well.
But I don't know how using it(my dll) in VB.
Can I using my dll in VB?
if yes, how.
0 Kudos
Message 1 of 2
(3,030 Views)
Jecki,

Yes, you can definatelly call the DLL from Visual Basic. You first need to tell CVI where the function lives and the prototype for it. For example if you created a DLL called MyDll with a function int MyFunc(int param) you would have to do something like this at the top of your VB file:


Declare Function Myfunc Lib "MyDll.dll" (param as Long) As Long


this tells VB the prototype of the function and you can now call it anywhere.


Dim RetVal As Long
Dim Param As Long

RetVal = MyFunc(Param)


I am sure you can find some more info on this on the web, the DLL created by CVI is just a standard DLL.

I hope this helps.

Regards,

Juan Carlos
N.I.
0 Kudos
Message 2 of 2
(3,030 Views)