Generating a GUID (again)
- New
- How-to
-
Marco Meoni
- PowerBuilder
- Friday, 16 May 2025 10:46 AM UTC
Hello,
I've copied this script from René Ullrich for generating a GUID: https://community.appeon.com/qna/q-a/generating-a-guid
- Running in PB IDE (2022, 2025, whatever), 32bit mode. Working ok.
- Running in PB IDE, 64bit mode: "Error calling external function function %s, at line 20...". This is a common error due to 32/64 bit datatypes change, it happens in CopyMemory().
I've applied the usual PB changes, from
Subroutine CopyMemory ( Ref string Destination, ulong Source, long Length ) Library "kernel32.dll" Alias For "RtlMoveMemory"
to
Subroutine CopyMemory ( Ref string Destination, Longptr Source, long Length ) Library "kernel32.dll" Alias For "RtlMoveMemory;Ansi"
and few variants.
Not working.
As much as I can try to investigate on the correct 64bit signature (MS Win32 API doc, kernel32.dll from system32/SysWOW64, DLL viewer tools, etc...) PB IDE 64 is still refusing to work.
Any help would be appreciated.
Best,
.m
Find Questions by Tag
Helpful?
If a reply or comment is helpful for you, please don’t hesitate to click the Helpful button. This action is further confirmation of their invaluable contribution to the Appeon Community.