This variable allows you to specify the calling convention used to call DLLs. When this variable is set to
0, the cdecl (standard C) interface is used. When this variable is set to
1, the stdcall (Pascal/WINAPI) interface is used. The default for this variable is "0".
Note that there are a few ways to override the DLL_CONVENTION setting:
- You can specify a list of DLL names and calling conventions in the
SHARED_LIBRARY_LIST configuration variable. This variable can be set in the environment, in the runtime configuration file, or programmatically
with the SET ENVIRONMENT statement.
- You can specify the calling convention for individual library functions in the COBOL CALL statement.
- You can set the
CODE_MAPPING variable to
1, then use configuration entries to specify the calling convention for individual functions.
- You can specify a list of DLL names and calling conventions using the
-y runtime option. (see the
-y listing in topic
Runtime Options,
ACUCOBOL-GT User's Guide.)
In all of these cases, the runtime uses the specified calling convention and ignores the value of the DLL_CONVENTION configuration
variable. See
Working with Windows Technologies in
A Guide to Interoperating with ACUCOBOL-GT for more details about calling DLLs.