Error dll function returning String made with bmax

BlitzMax Forums/BlitzMax Programming/Error dll function returning String made with bmax

In the dll
Function GetMyString:byte ptr()
Local ls_msg:String = "Test de retour de valeur au format string"
Return ls_msg.ToCString()
End Function


And in the test program
Global GetMyString:byte ptr() = GetProcAddress ( Library , "GetMyString" )
...
DebugLog "GetMyString=" + String.FromCString(GetMyString())