Try OpenEdge Now
skip to main content
Programming Interfaces
External Program Interfaces : Shared Library and DLL Support : Accessing a shared library entry point : Declaring a shared library for static access : Windows DLL calling conventions for static access
 
Windows DLL calling conventions for static access
The PROCEDURE statement allows you to specify the calling convention—C, Pascal, or standard—that your DLL requires. The default is the standard calling convention. Many Windows functions use the standard calling convention. Windows functions that take a variable number of arguments, such as wsprintf( ), often use the C calling convention. For more information on the C, Pascal, and standard calling conventions, see Microsoft C Language Reference. For more information on the calling convention that a particular Windows function requires, see Microsoft Windows Programmer's Reference. The following table shows how to specify calling conventions.
Table 52. DLL calling conventions
To specify this calling convention...
Code this option...
C
C
Pascal
PASCAL
Standard
STDCALL
You can alternatively specify the DLL entry point by number with the ORDINALn option, where n is the ordinal number of the entry point in the library. If you specify the entry point by number, proc-name can have any unreserved identifier value, but you must use the same value for the RUN statement that executes the DLL routine.
Note: The 64-bit Windows GUI and character clients ignore the CDECL, PASCAL, and STDCALL calling conventions if they are specified. The 64-bit Windows GUI and character clients always use the standard 64-bit FASTCALL calling convention.