gtpc2mbgC/C++ Language Support User's Guide

Type Definitions

TPFCS uses the following type definitions:

TO2_ENV_PTR
This type is defined as a pointer to void. This pointer value is set by calling the TO2_createEnv function and passing a pointer to this pointer. It is set by TPFCS to point to the environment block.

TO2_PID
This type defines the TPFCS persistent identifier (PID) that is assigned to a collection when it is created and is then used to refer to the collection until it is deleted from the TPFCS database.

TO2_PID_PTR
This type is defined as a TO2_PID pointer and should be set to point to a TO2_PID type.

TO2_BUF_HDR
This type defines the returned TPFCS data buffer header that is returned on an element retrieval using such TPFCS functions as TO2_at, TO2_atKey, TO2_atCursor, and TO2_key.

The structure of this buffer has five fields:

Field
Description

spare
Type long, reserved for IBM use.

updateSeqNbr
Type long, update sequence counter value.

dataL
Type long, length of the data.

spare
Type long, reserved for IBM use.

data
Array of ', the beginning of the actual data. The data does not contain the key.

The actual data element then follows the header.

TO2_BUF_PTR
This type is defined as a TO2_BUF_HDR pointer value.

TO2_ERR_CODE
This type is defined as a long integer that, on return from a TO2_getErrorCode function, contains the actual error code for the request. The error code returned is the error code stored in the environment block.

TO2_ERR_TEXT_PTR
This type is defined as a character pointer and is returned from a TO2_getErrorText call. It will point to text that describes the actual error that occurred.