Oxygen Basic
Information => Development => Topic started by: Brian Alvarez on December 20, 2018, 05:41:22 PM
-
Hello Charles, title says it all. Im trying to implement CDECL and SDECL, but i dont know what direction does Oxygen
pushes parameters to subs and functions. Is there already a silent goodie regarding this?
-
Hi Brian,
o2 supports stdcall (default) and cdecl for 32-bit systems, and ms64 (default) for 64bit-systems. These standards only apply to imported/exported functions and virtual objects.
-
In other words, they get automatically adjusted for standards automatically?
can they be changed manually? If they can't, no problem, i just want to know if
there is a switch.
For example, can exported modules use SDECL?
-
CDECL is the only one you would ever need to specify, and that is confined to 32-bit systems. There is only one calling convention for MS 64-bit.
You can specify cdecl for a whole block of functions:
This is the start of MSVCRT.INC:
#ifndef mode64bit
extern lib "Msvcrt.dll" cdecl
#else
extern lib "Msvcrt.dll"
#endif