OSI/MHS Gateway Programmatic Interface (GPI) Programming Guide
The GPI Library
OSI/MHS Gateway Programmatic Interface (GPI) Programming Guide—424822-001
2-3
Environment Management Procedures
an internal workspace necessary for other GPI procedures to operate correctly. It has
parameters that allow you to tailor the workspace to your gateway needs.
The workspace is a memory segment dedicated to the GPI library. The segment stores
operational information such as the identity of current GPI sessions and recent errors.
The segment also provides memory space for object management. All other GPI
procedures use this GPI library memory space. If any other procedure is called before it
is in place, the procedure fails immediately.
GPI_OPEN_ and GPI_CLOSE_
The GPI_OPEN_ procedure establishes a session with the GPI service. A GPI session
must bracket all object management and message transfer operations. A session is
created by linking several internal processes between the client program and the
OSI/MHS MTA. The links remain in place until the session is ended by a call to the
GPI_CLOSE_ procedure.
A client program can establish up to 15 GPI sessions. As described later in this guide, a
session can handle either outbound processing, inbound processing, or both.
GPI_STATUS_
The GPI_STATUS_ procedure returns information about a failure of a GPI procedure.
GPI_STATUS_ has several output parameters that return high-level diagnostic codes. In
addition, for certain errors, GPI_STATUS_ writes low-level diagnostic data to an
information buffer.
Figure 2-1. GPI Program Flow: Environment Management Procedures
201CDT .CDD
GPI Procedure
Open a session
Program Flow
Note: GPI_STATUS_ may
be used anytime after
successful GPI_INITIALIZE_
Initialize workspace
GPI_CLOSE_
Object management: GPI_OM_xxx_
Message transfer: GPI_MT_xxx_
Object management and
message transfer operations
GPI_OPEN_
GPI_INITIALIZE_
Close a session