IBM AS/400 manual Examples of Using Bindable APIs, Calling a Graphics Routine

Models: AS/400

1 489
Download 489 pages 47.95 Kb
Page 180
Image 180
Calling a Graphics Routine

Calling a Graphics Routine

You

access ILE

bindable

APIs

using

the

same call

mechanisms

used

by

to

call

procedures,

that

is,

the

CALLP

operation

or

the

CALLB

operation.

returns

a

value

and

you

want

to

use

it,

call

the

API

in an expressio

information

required

to define

a

prototype for

an

API

see

the

descr

in

theSystem

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, ...n parmare omissible or required parameters passed to

returned from the called API.

¹feedback is an omissible feedback code that indicates the result API.

Note: Bindable APIs cannot be used if DFTACTGRP(*YES) is specified on the CRTBNDRPG command.

For more information on bindable APIs, Systemrefer APIto Referencethe .

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 a

example of using CEEGTST, CEEFRST, and CEECZST.

¹ “Using a Condition Handler” on page 238, for an example of using CEEHD and CEEHDLU.

¹“Using Cancel Handlers” on page 244, for an example of using CEERTX a

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, Managerset (GDDMof

 

graphics primitives for drawing

pictures),

and

Presentation

Graphics

Rout

of business charting routines).

Factor 2

must

contain the

literal

or

name

'GDDM' (not a variable). Use the PLIST and PARM operations to pass the parameters:

156 ILE RPG for AS/400 Programmer's Guide

Page 180
Image 180
IBM AS/400 manual Examples of Using Bindable APIs, Calling a Graphics Routine