Specifies a
cdecl-style calling convention in a procedure declaration
Syntax
Description
In procedure declarations,
cdecl specifies that a procedure will use the
cdecl calling convention. In the
cdecl calling convention, any parameters are to be passed (pushed onto the stack) in the reverse order in which they are listed, that is, from right to left. The procedures need not preserve the
EAX,
ECX or
EDX registers, and must not clean up the stack (pop any parameters) before it returns - that is left to the calling code.
cdecl is the default calling convention for procedures declared within
Extern "C" and
Extern "C++" blocks.
cdecl is also typically the default calling convention for many C compilers.
Example
' declaring 'strcpy' from the standard C library
Declare Function strcpy cdecl Alias "strcpy" (ByVal dest As ZString Ptr, ByVal src As ZString Ptr) As ZString Ptr
Differences from QB
See also