altarama Posted May 1, 2009 Report Share Posted May 1, 2009 Hi, I have a DLL that returns data as a StringBuilder object. In VB, we can easily get the string value from this by calling the ToString() funtion on it. However, I need to read this DLL from LabVIEW and can't seem to find a simple way to get the string value out of it. Has anyone done this before? Jeffrey Quote Link to comment
stevea1973 Posted May 4, 2009 Report Share Posted May 4, 2009 QUOTE (altarama @ Apr 30 2009, 12:15 PM) Hi,I have a DLL that returns data as a StringBuilder object. In VB, we can easily get the string value from this by calling the ToString() funtion on it. However, I need to read this DLL from LabVIEW and can't seem to find a simple way to get the string value out of it. Has anyone done this before? Jeffrey From what I have seen you should use an Invoke node and get the ToString() method called. I guess labview will take care of Unicode or UTF-8/32 to your code page conversion. Quote Link to comment
Rolf Kalbermatter Posted May 5, 2009 Report Share Posted May 5, 2009 QUOTE (stevea1973 @ May 2 2009, 09:43 PM) From what I have seen you should use an Invoke node and get the ToString() method called. I guess labview will take care of Unicode or UTF-8/32 to your code page conversion. No LabVIEW has to this point no official Unicode support. You can make it work sort of by adding an token to the INI file but it is still not full support for Unicode strings in all LabVIEW strings. But there is a LabVIEW VI library unicode.llb at both on the NI site and also here posted as attachment to some posts (Google is your friend ), that calls into the MultiByteToWideChar and WideCharToMultiByte Windows APIs to do the translation between the LabVIEW MultiByte encoding and Unicode 16Bit encoding. Rolf Kalbermatter Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.