ILE RPG Programmer's Guide
- To ensure that your RPG procedure will communicate
correctly with an ILE CL procedure, code EXTPROC(*CL:'procedurename') on
the prototype for the ILE CL procedure or on the prototype for the
RPG procedure that is called by the ILE CL procedure.
- To ensure that your RPG procedure will communicate
correctly with an ILE C procedure, code EXTPROC(*CWIDEN:'procedurename') or EXTPROC(*CNOWIDEN:'procedurename') on
the prototype for the ILE C procedure or on the prototype for the
RPG procedure that is called by the ILE C procedure. Use *CNOWIDEN
if the ILE C source contains #pragma argument(procedure-name,nowiden) for
the procedure; otherwise, use *CWIDEN.
- If you want your RPG procecure to be used successfully
by every ILE language, do not specify any special value on the EXTPROC
keyword. Instead, avoid the following types for parameters that are
passed by value or return values:
- Character of length 1 (1A or 1N)
- UCS-2 of length 1 (1C)
- Graphic of length 1 (1G)
- 4-byte float (4F)
- 1-byte or 2-byte integer or unsigned (3I, 3U, 5I, or 5U)
- RPG procedures can interact with ILE C/C++ procedures
that use 8-byte pointers. However, the ILE C/C++ procedures must
use 16-byte pointers for parameters. See the IBM® Rational® Development Studio for i: ILE C/C++ Compiler Reference.
- RPG file parameters prototyped with the LIKEFILE keyword
are not interchangeable with file parameters from other languages.
For example, you cannot pass an RPG file to a C function that is expecting
a FILE or RFILE parameter. Similarly, a C function cannot pass a FILE
or RFILE parameter to an RPG procedure if the RPG parameter was prototyped
with the LIKEFILE keyword.
[ Top of Page | Previous Page | Next Page | Contents |
Index ]