05-02-2008 01:50 AM
05-02-2008 04:16 PM
05-04-2008 09:37 AM - edited 05-04-2008 09:39 AM
@simon76 wrote:Hi all,I have C++ dll & header file provide by one of the instrument company.By using labview, I able to call several function from the dll but not all that show in the header file. Can someone help me??Attach with the header file, only able call for the Global Function Declarations but not those API classes.Thanks and Best Regards,Simon
05-04-2008 08:53 PM
Hi guys,
Thanks for the reply. Attach with test.zip which include the dll & other support files.
Hi Rolfk,
I do need to access the public variables of those objects e.g call the handles..
since i not master yet in C++ but from your reply, it's impossible to call those function except used the C++ compiler??
Regards,
Simon76
~no pain no gain~
05-05-2008 12:44 AM - edited 05-05-2008 12:47 AM
Yes in that case you will have to use a C++ compiler in order to write a wrapper DLL that exports accessor functions for those puclic variables and any object methods you want to call. As far as LabVIEW's Call Library Node is concerned you will treat those C++ object pointers simply as an uInt32 variable.
@simon76 wrote:
I do need to access the public variables of those objects e.g call the handles..since i not master yet in C++ but from your reply, it's impossible to call those function except used the C++ compiler?
05-05-2008 12:51 AM
05-05-2008 01:21 PM
It's nothing special but simply a DLL that exports an API that is more LabVIEW friendly and calls your other DLL. It can translate between LabVIEW friendly parameters and the other DLL's complex parameters. And it would for instance export C functions that call the C++ object methods and access the public C++ object variables.
@simon76 wrote:wrapper dll is new for me. How it work?? Any examples or good reference link that i can refer to??thanks and regards,Simon
05-05-2008 04:44 PM
05-05-2008 10:06 PM
I have go through the examples, in order to write wrapper dll, may need to have the source-code.
But I do not have the C++ code here, so what i can do is to modify the header file, am i correct??
05-06-2008 12:57 AM - edited 05-06-2008 12:59 AM
You sure have still a lot of learning C to do before you can hope to interface that DLL to LabVIEW.
@simon76 wrote:
I have go through the examples, in order to write wrapper dll, may need to have the source-code.
But I do not have the C++ code here, so what i can do is to modify the header file, am i correct??