LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

std::string in dll

I'm trying to call a function in a dll that has the prototype
 
unsigned int InitializeMAPS( std::string );
 
What is the proper LV type to pass into the function?
 
Thanks,
Bill F
0 Kudos
Message 1 of 3
(3,330 Views)
Oh, bad, bad, bad...You should never expose C++ classes across a DLL boundary like that (interfaces not included). This isn't a C++ programming group, but if you ever want to know, just email me and I'll explain.
 
Anyway, you cannot call this from LabVIEW (or any other language than the specific version of the C++ compiler it was built with, and even then you have other problems). You'll need to create a wrapper DLL that exposes a method such as
 
unsigned int InitializeMAPS(const char*)
 
and have that DLL call this other once. Again, you'll want to get with whomever created that DLL to ensure you're using the same compiler and the same implementation of the STL library.
0 Kudos
Message 2 of 3
(3,321 Views)

Ok.  Fortunately, I have access to the guy who wrote it.  He is making a new version that accepts a char* instead.

Thanks,

Bill  F

0 Kudos
Message 3 of 3
(3,311 Views)