Data Transformation Engine Services Guide

Chapter 16 – Exit Parameters (EXITPARAM structure)
100
Chapter 16 – Exit Parameters
(EXITPARAM structure)
The parameter to all of the functions listed above is a single structure called
‘EXITPARAM.
The Mercator Command Server allocates and frees the EXITPARAM structure. The
adapter specified for a data source or target is not responsible for freeing the memory
allocated for this structure.
struct tagExitParamStruct
{
DWORD dwSize; /* The size of this structure */
DWORD dwToLen; /* Bytes sent to target */
DWORD dwFromLen; /* Bytes returned from source */
DWORD dwMapInstance; /* Map instance number */
void FAR * lpv; /* General purpose pointer */
LPSTR lpszCmdLine; /* Adapter command line */
BYTE HUGE * lpDataToApp; /* Data sent to target */
BYTE HUGE * lpDataFromApp; /* Data returned from source */
UINT uRetryCount; /* Retry this many times */
UINT uRetryInterval; /* Retry every n seconds */
BOOL bRollback; /* Rollback = TRUE, commit = FALSE */
BOOL bCleanup; /* Indicates whether a cleanup call */
int nReturn; /* Return code. 0:success, -:error, +:warn */
char szErrMsg[100]; /* Error message */
char szFile[260]; /* File returning data from source */
void FAR * lpMapHandle; /* For maps in memory */
void FAR * lpInternal; /* Non-public information (as needed) */
void FAR * lpCmdStruct; /* Command structure (post 2.0) */
void FAR * lpAdaptParms; /* Adapter parameter structure */
void FAR * lpContext; /* The connection context */
void FAR * lpWildcard; /* Wildcard value (can be binary) */
void FAR * lpfnMS; /* status proc */
void FAR * lpMS; /* status structure */
DWORD dwWildcardSize; /* Size of wildcard value */
LPSTR lpszMapDirectory; /* Directory of map */
WORD wCardNum; /* Card number (1-100) */
WORD wCleanupAction; /* Action on cleanup. See ACTION_* */
WORD wScope; /* Transactional scope. See SCOPE_* */
UINT uUnitSize; /* Fetch/send unit size */
BOOL bBurst; /* Cardmode is burst or integral */
BOOL bFromRule; /* called from a rule as opposed to card */
BOOL bSource; /* get (true), put (false) */
DWORD dwRecords; /* records read/written */
};
typedef struct tagExitParamStruct EXITPARAM;
typedef struct tagExitParamStruct * LPEXITPARAM;
Some further explanation for some of the fields:
lpAdaptParms The adapter specific parameter structure populated by the
adapter’s ‘Validate Command’ function. This is passed to all other adapter calls.
lpContext A structure containing any handles or other objects that maintain the
context of a connection. It is created during the ‘Connect’ call and then passed to all
other adapter calls.
lpszMapDirectory The full path of the map (.mmc) file, including the file itself.