For example i try to return "Hello World" from a DLL, the returned string is read and displayed in the ASCII caller as only "H".
Code: Select all
; DLL UNICODE
structure myInfo
str$
endStructure
procedureDLL getInfo ()
*inf. myInfo = allocateStructure (myInfo)
*inf \ str$ = "Hello World"
procedureReturn *inf
endProcedure
; ExecutableFormat = Shared dll
; EnableUnicode
Code: Select all
; CALLER ASCII
structure myInfo
str$
endStructure
lb = openLibrary (#pb_Any, "unicode.dll")
*inf.myInfo = callFunction (lb, "getInfo")
debug *inf \ str$



