LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Calling DLL function using LabVIEW 7.1?

Here's the scinario:
I have LabVIEW 7.1 and i'm trying to call a DLL function using 'CALL LIBRARY FUNCTION NODE'.
I have used this in the past with no problem. But right now, when I use this node and link it to the
library and function name, i get 'ERROR loading Dllname.dll' message.
 
NOTE that the DLL is generated using VStudio2003 or VStudio.NET. Could this be a problem??
Also, i noticed that there are some JUNK characters before & after the function name that show
up in function prototype:
 
 
long ?EcpvsSign@@YAHHPBEH0HPAE1@Z(long Signer, CStr NonRMsg, long NonRMsgLen,
CStr RMsg, long RMsgLen, CStr SigR, CStr SigS);
0 Kudos
Message 1 of 3
(2,650 Views)

Hi rkpat,

      You might check-out this thread on building WIN32 DLLs - expecially the bit re: "mangles names" under the paragraph titled "C Language Source File".  My recollection is that 'extern "C"' directive in the header file for the DLL solved the name-mangling problem, but it's been a few years! Smiley Wink

Cheers!

 

Message Edited by tbd on 03-01-2007 11:19 PM

"Inside every large program is a small program struggling to get out." (attributed to Tony Hoare)
0 Kudos
Message 2 of 3
(2,640 Views)


@tbd wrote:

Hi rkpat,

      You might check-out this thread on building WIN32 DLLs - expecially the bit re: "mangles names" under the paragraph titled "C Language Source File".  My recollection is that 'extern "C"' directive in the header file for the DLL solved the name-mangling problem, but it's been a few years! Smiley Wink

Cheers!

 

Message Edited by tbd on 03-01-2007 11:19 PM


tbd is right. You have to first disable name mangling as it creates all kind of troubles. Other issues might be that your Visual Studio 2003 or .Net edition links in dynamic runtime libraries that are not standard available on every Windows PC so that you need to redistribute the according runtime library installer together with your app for the DLL to be even loadable.

Rolf Kalbermatter
Rolf Kalbermatter
My Blog
Message 3 of 3
(2,627 Views)