LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Help!Dll Problem

hi! sir:
I want to use dll which is created by vc6.0 in CVI application,someone say there are two
ways to realize it ?
1:use winAPI LoadLibray();GetProcAddress();
2:use CVI to generate the lib of the dll.(I open .h,chose Generate DLL Import Libray
under option menu)
I tried both of the two ways,but failed.Who can tell me?
Thank you in advance!
The following is two prjs that I tried,but failed.
Download All
0 Kudos
Message 1 of 2
(2,942 Views)
I think the problem is the decorated function names that the VC compiler is generating. You need to use the extern "C" statement when generating the dll so that CVI (an ANSI C compiler, which does not handle decorated function names) will be able to find the function accordingly.
You can actaully view the functions in your dll by using a tool called Dependency Walker, and you can see how the function is named. Just a quick tool you can use when using dll's.


Hope this helps

Bilal Durrani
NI
Bilal Durrani
NI
0 Kudos
Message 2 of 2
(2,942 Views)