Incorrect prototype conversion in C by pbcompilerc
Posted: Sun Nov 10, 2024 6:14 pm
Hi,
I'm a long-time user of PureBasic (so great software) but new to the forum.
I wanted to report a bug that occurred in the recent PureBasic 6.12 LTS (I also got this bug in 6.11).
I have this PB code:
When I compile it with the C purebasic compiler, it translates to:
As no specific calling convention is defined in the C file, this defaults to __cdecl on Windows.
However, in the help, it is said that by default the function will use the standard call convention (stdcall on x86, or fastcall on x64). If the function pointer will be a C one, the PrototypeC variant should be used instead.
This causes my program to fail in 32-bit since it expects stdcall.
Is there something I'm missing or is it a bug of the pbcompilerc?
Thank you!
I'm a long-time user of PureBasic (so great software) but new to the forum.
I wanted to report a bug that occurred in the recent PureBasic 6.12 LTS (I also got this bug in 6.11).
I have this PB code:
Code: Select all
Prototype.i ProtoCallbackDialog(dlgMessage.i, hWnd, dlgControl)
ProcedureDLL.i AfficheDialogue(dialogueid.s, pointeur_fonction_callback.ProtoCallbackDialog)
etc
Code: Select all
typedef integer (*pf_protocallbackdialog)(integer v_dlgmessage,integer v_hwnd,integer v_dlgcontrol);However, in the help, it is said that by default the function will use the standard call convention (stdcall on x86, or fastcall on x64). If the function pointer will be a C one, the PrototypeC variant should be used instead.
This causes my program to fail in 32-bit since it expects stdcall.
Is there something I'm missing or is it a bug of the pbcompilerc?
Thank you!