PC SOFT

FOROS PROFESIONALES
WINDEVWEBDEV y WINDEV Mobile

Inicio → WINDEV 2024 → Set calling convention for DLL callback procedure to CDECL
Set calling convention for DLL callback procedure to CDECL
Iniciado por guest, 16,jul. 2015 13:00 - 4 respuestas
Publicado el 16,julio 2015 - 13:00
Hi all,

I want to set calling convention for my DLL callback to CDECL as my external API is written in CDECL. I tried below line according to WinDev help section

PROCEDURE <Procedure Name> (<Param1> is <Type1>, ...
<Param2> is <Type2>) <call convention=CDECL>

But it says attribute unknown. Any suggestions how to set my call back calling convention to CDECL?

Thanks and Regards,
Naveen Rathan
Publicado el 16,julio 2015 - 13:17
did you try using one API description variable to change the CallingConvention

http://doc.windev.com/en-US/…
Publicado el 16,julio 2015 - 13:33
Hi Paulo,

Actually I want one of my WinDev procedures to be run in CDECL convention style. API description will not help in this case.

Below is my code:

ret_val = API("dllname.dll","api_name",&myprocedure)

I want myprocedure to use CDECL convention rather that default ones which is stdcall.

Any help on this?

Thanks and Regards,
Naveen Rathan
Publicado el 16,julio 2015 - 14:51
Hi Naveen,

As far as I know, there is a small glitch (which you can report) but it will only work with the French syntax :

< convention appel=CDECL >

(We use it and it works, in the French version. Try it with the French syntax.)

Best regards,
Alexandre Leclerc
Publicado el 21,julio 2015 - 08:01
Thanks Alexandre. It worked.