IBM AS/400 Frozen Dessert Maker User Manual


 
Calling a Graphics Routine
You access ILE bindable APIs using the same call mechanisms used by ILE RPG
to call procedures, that is, the CALLP operation or the CALLB operation. If the API
returns a value and you want to use it, call the API in an expression. For the
information required to define a prototype for an API see the description of the API
in the
System API Reference
. Figure 72 shows a sample 'call' to a bindable API.
D CEExxxx PR EXTPROC('CEExxxx')
D parm1 ...
D ...
C CALLP CEExxxx( parm1 : parm2 : ... :
parmn : feedback)
or
C CALLB 'CEExxxx'
C PARM parm1
C PARM parm2
...
C PARM parmn
C PARM feedback
Figure 72. Sample Call Syntax for ILE Bindable APIs
where
CEExxxx is the name of the bindable API
parm1, parm2, ... parm
n
are omissible or required parameters passed to or
returned from the called API.
feedback is an omissible feedback code that indicates the result of the bindable
API.
Note: Bindable APIs cannot be used if DFTACTGRP(*YES) is specified on the
CRTBNDRPG command.
For more information on bindable APIs, refer to the
System API Reference
.
Examples of Using Bindable APIs
For examples of using bindable APIs, see:
“Sample Service Program” on page 94, for an example of using CEEDOD
“Managing Your Own Heap Using ILE Bindable APIs” on page 119. for an
example of using CEEGTST, CEEFRST, and CEECZST.
“Using a Condition Handler” on page 238, for an example of using CEEHDLR
and CEEHDLU.
“Using Cancel Handlers” on page 244, for an example of using CEERTX and
CEEUTX.
Calling a Graphics Routine
ILE RPG supports the use of the CALL or CALLP operation to call OS/400
Graphics, which includes the Graphical Data Display Manager (GDDM, a set of
graphics primitives for drawing pictures), and Presentation Graphics Routines (a set
of business charting routines). Factor 2 must contain the literal or named constant
'GDDM' (not a variable). Use the PLIST and PARM operations to pass the following
parameters:
156 ILE RPG for AS/400 Programmer's Guide