I'm calling a function in a C++ DLL from VB with the following declaration.
Public Declare Function MyFunction Lib "MyDLL.dll" (ByRef MyString As String) As Long
long __stdcall CWordAPIApp::MyFunction( char** MyString)
It works fine except that the string returned from the DLL to VB contains a NULL character at the end (e.g: "exemple¦")
I'd like to modify the DLL in order to return a standard VB string (e.g: "exemple"). I don't want to truncate the last character of the string in the VB code.