LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Call External DLL on LabWindows

Hi,

 

I have a LabWindows CVI 8.0.

I have a problem with any DLL with a USB Instrument.

 

From CD-ROM i get the library for interface my project with instrument (7 DLL files and one CHM Help file).

I haven't a LIB or Header Files.

 

Is possible with LabWindows call the DLL function ?

 

If is possible, can you write a example please?

 

Thanks

Tommaso

 

0 Kudos
Message 1 of 4
(3,494 Views)

Ciao Tommaso,

 

 you can take a look at this document, that explains how to call DLLs in CVI without having the .LIB and the .H files:

How Can I Access DLL Functions in a LabWindows/CVI Program Without Including the Import Library in t...

 

If you have the .H file you can create the .LIB yourself in the way explained  in this other document:

Linking to Functions Defined in a DLL From LabWindows/CVI

 Hope this can help,

Ciao,

Andrea N.
Principal Applications Engineer - Semiconductor EMEA
National Instruments Italy
Certified LabVIEW Architect - Certified TestStand Architect
0 Kudos
Message 2 of 4
(3,478 Views)

Hi,

 

I have a problem.

 

I can't use a function if not declare a variable.

 

For example:

On DLL i have a class name -> TestOne

I haven't a Header file or Lib File, as I declare this class?

 

My problem is call this example: TestOne->DllFunction().

I verify with: GetProcAddress(hinstLib, "TestOne->DllFunction()");

But don't work fine.

 

Sorry for my english.

 

Thank you for your support

Tommaso

 

 

0 Kudos
Message 3 of 4
(3,447 Views)

Hi,

I explane my problem with this project:

 

I have a example on Visual Studio C++, this is the code:

 

[On Header file]
IFiberChek2Ptr m_pFiberChek2;

 

[On code file]
m_pFiberChek2 = IFiberChek2Ptr( __uuidof(FiberChek2Window) );

 

[On TLH file]
struct __declspec(uuid("d381ffc3-b122-4a57-b4b0-549f6378ba9a"))
/* LIBID */ __FiberChek2Lib;
struct __declspec(uuid("b4947355-4670-4d03-af25-cbf22f86a6ef"))
/* dual interface */ IFiberChek2;
struct /* coclass */ FiberChek2Window;

//
// Smart pointer typedef declarations
//

_COM_SMARTPTR_TYPEDEF(IFiberChek2, __uuidof(IFiberChek2));

 


[I must call this function]
m_pFiberChek2->TestFiber();

 


Have you a advice for me?

 

Thank you for your support
Tommaso

 

0 Kudos
Message 4 of 4
(3,436 Views)