The external API function returns garbled characters
Symptom
Calling the following function returns garbled code.
|
1 |
function boolean GetComputerNameA(ref string lpBuffer, ref ulong nSize) library "kernel32.dll" |

Environment
PowerBuilder 2017 or later
Cause
This is because the external API function is not properly
declared.
Solution
Modify the API declaration as follows to solve the problem:
|
1 |
Function boolean GetComputerNameA(ref string lpBuffer, ref ulong nSize) library "kernel32.dll" alias for "GetComputerNameA;Ansi" |
Document get from Powerbuilder help
Thank you for watching.
Subscribe
Login
0 Comments
Oldest