•  Back 
  •  Application Services Library 
  •  Index 
  •  Tree View 
  •  Cross references 
  •  %About 
  •  Show info about hypertext 
  •  View a new file 
Topic       : The ATARI Compendium
Author      : Scott Sanders / JAY Software
Version     : 1.25 (20/6/2003)
Subject     : Documentation
Nodes       : 1117
Index Size  : 32614
HCP-Version : 6
Compiled on : Atari
@charset    : UTF-8
@lang       : en
@default    : 
@help       : %About
@options    : +g -i -t4 +y +z
@width      : 100
View Ref-Fileappl_write()
Application Services Library
appl_read()                                                             AES

Syntax

WORD appl_read( ap_id, length, message )
WORD ap_id, length;
VOIDP message;

Function       appl_read() is designed to facilitate inter-process
               communication between processes running under the AES. The
               call will halt the application until a message of
               sufficient length is available (see version notes below).

Opcode         11 (0x0B)

Availability   All AES versions.

Parameters     ap_id is your application identifier as returned by
                  appl_init().
               length is the length (in bytes) of the message to read.
               message is a pointer to a memory buffer where the incoming
                  message should be copied to.

Binding        intin[0] = ap_id;
               intin[1] = length;

               addrin[0] = message;

               return crys_if(0x0B);

Return Value   appl_read() returns 0 if an error occurred or non-zero
               otherwise.

Version Notes  If the AES version is 4.0 or higher and appl_getinfo()
               indicates that this feature is supported, ap_id takes on an
               additional meaning. If APR_NOWAIT (-1) is passed instead of
               ap_id, appl_read() will return immediately if no message is
               currently waiting.

Comments       Normally this call is not used. evnt_multi() or
               evnt_mesag() is used instead for standard message
               reception. appl_read() is required for reading messages
               that are long and/or of variable length.
               It is recommended that message lengths in multiples of 16
               bytes be used.

See Also       appl_write()

Group          Application Services Library