Previous topic |
Next topic |
Contents |
Contact z/OS |
Library |
PDF
Writing your C DLL code z/OS Language Environment Programming Guide for 64-bit Virtual Addressing Mode SA38-0689-00 |
|
To build a C DLL, write code using the #pragma export directive to export specific external functions and variables as shown in Figure 1. Figure 1. Using #pragma
export to create a DLL executable module named BASICIO
For the previous example, the functions bopen(), bclose(), bread(), and bwrite() are exported; the variable berror is exported; and the variable buffer is not exported. Note: To export all defined functions and variables with external
linkage in the compilation unit to the users of the DLL, compile with
the EXPORTALL compile option. All defined functions
and variables with external linkage will be accessible from this DLL
and by all users of this DLL. However, exporting all functions and
variables has a performance penalty, especially when compiling with
the C/C++ IPA
option. When you use EXPORTALL you do not need to
include #pragma export in your code.
|
Copyright IBM Corporation 1990, 2014
|