LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Using Labwindows DLL in Visual C

I have provided a Labwindows generated DLL to a client using Visual C.  The DLL works fine in Labwindows and VB, but the client is unable to load using Visual C.  The DLL simply does some calculations based on input parameters - no UIR's,callbacks, etc.  I have no experience with Visual C to advise.  Is there a link or reference that shows start-to-finish how to implement the DLL for Visual C.  There is also a question as to where the DLL and cvirte.dll should reside on the client's system?  Perhaps that is the problem?
0 Kudos
Message 1 of 4
(3,493 Views)
The CVIrte.dll should be installed on the client's system when they install the cvi run time engine. Here is a project that provides a dll with a simple function that displays whatever number and string you pass it http://zone.ni.com/devzone/cda/epd/p/id/6151 . I recommend trying to call that DLL and posibly re-installing the CVI run time engine on the client's machine. What errors is the client getting, and when? Is the client calling the dll dynamicaly or through the .lib ? If it is dynamically, when exactly does the calls to the dll error out and do you get any error messages. You normally have to load the dll into memory, then invoke a function and then call the function. Can the VC program load the dll and invoke the function correctly?
Richard S -- National Instruments -- (former) Applications Engineer -- Data Acquisition with TestStand
0 Kudos
Message 2 of 4
(3,472 Views)
Thanks for the input. The DLL is being loaded via LoadLibrary.  I have written a test program to do this in CVI and it does work correctly.  Have advised client to place all the NI dll's /cvrte folder into system32.  Now the question is: Can these NI files be placed elsewhere?  This is what the client is struggling with.
0 Kudos
Message 3 of 4
(3,445 Views)
The location that the dlls can be placed is based on the DLL search order from microsoft... http://msdn.microsoft.com/en-us/library/ms682586%28VS.85%29.aspx . If you move NI dll's there is no guarantee that all NI software will still behave as expected. The most common place to place a user generated DLL is at the top level directory of a project or executable.
Chris Bolin
LabVIEW Partner Program, CLA
0 Kudos
Message 4 of 4
(3,428 Views)