IBM AS/400 ユーザーズマニュアル

ページ / 489
 
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')
parm1 
...
...
C
CALLP
CEExxxx( parm1 : parm2 : ... :
parmn : feedback)
 or
CALLB
'CEExxxx'
PARM
parm1
PARM
parm2
 
...
PARM
parmn
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