How to pass a string from a vb.net dll to C++ dll
-
Any pointers/samples on how I can pass a string from a Vb.NET dll to a C++ dll and vice versa would be greatly appreciated. Thank you
That depends on what the C++ code is expecting, l;ike what type of string and if your expect that string to be modified by the code your calling and how you're calling it. This[^] is about the only guide that covers most of the possiblities.
A guide to posting questions on CodeProject[^]
Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
2006, 2007 -
That depends on what the C++ code is expecting, l;ike what type of string and if your expect that string to be modified by the code your calling and how you're calling it. This[^] is about the only guide that covers most of the possiblities.
A guide to posting questions on CodeProject[^]
Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
2006, 2007Thank you for the reply and link, Dave. The "C" dll passes a "char*" as input parameter to the VB.NET dll. The VB.NET dll "receives" this input param as a "String" object. This String object is not manipulated/modified by the VB.NET dll - essentially it is a path to a file that it reads and performs a base64 conversion. The base64 converted "String" object is then passed back to the "C" dll.