Showing results for 
Search instead for 
Did you mean: 

C ++ DLL



Can someone help me to convert the attached C++ .cpp file to a DLL that i can use with Labview?


Thanks in advance


0 Kudos
Message 1 of 5

Umm... what?


Are you asking how to write a C++ DLL?  This is a really bizarre request to make on a LabVIEW forum.


Be aware that LabVIEW handles only C DLLs, not C++ DLLs.

0 Kudos
Message 2 of 5

Well, you need to wrap the C++ object into standard C functions and create a wrapper DLL from that code, in order to access this DLL. LabVIEW can NOT create std:: datatypes to pass to the DLL so what you need to do is create a the wrapper in C++, that exports standard C functions for the constructor and every object method. If you need support for the callback it gets even more complicated as you will have to convert the callback in your C wrapper into a LabVIEW user event.


This is anything but trivial work even for me and I guess I would work a day or three on this, before having everything so far, partly because I have no idea at all about std:: types so far. If there is a change to get the TCP/IP protocol specification of the device, I would certainly think that creating a VI library based on the TCP function nodes would be probably easier to implement than trying to wrap this DLL so it can be called with the Call Library Node. Another approach would be to turn this into an ActiveX object, as C++ to ActiveX should be fairly straigth forward, but I don't have any idea about how to go about this in detail.

Rolf Kalbermatter
My Blog
0 Kudos
Message 3 of 5



I suspect that, given the nature of the question, everything you said probably went right over his head. Woooosh. Smiley Happy

0 Kudos
Message 4 of 5

Tnx for the replies , i understand that it is not easy to convert.


0 Kudos
Message 5 of 5