Data Transformation Engine Services Guide

Chapter 17 Calling Interface for Functions
102
Chapter 17 – Calling Interface
for Functions
This section describes in detail the calling interface for each of the functions described
above. In all calls, the parameter LPEXITPARAM is the only parameter (or NULL). For
each function, only the fields in the EXITPARAM structure that are useful to that
function are described. Any others are undefined and should not be used or referenced.
Initialize Adapter Command
This is called once when the adapter is first loaded. It is called prior to any other call to
the adapter. It gives the adapter an opportunity to allocate/initialize global variables,
linked lists and so on.
The function has the prototype:
void InitializeAdapter ( EXITPARAM * );
The parameter LPEXITPARAM will always be NULL.
Shutdown Adapter Command
This is called once when the adapter is unloaded. It is called after all other calls to the
adapter. It gives the adapter an opportunity to remove free up global memory, linked lists
and so on.
The function has the prototype:
void ShutdownAdapter ( EXITPARAM * );
The parameter LPEXITPARAM is always NULL.
Validate Command
This function will verify that the command line is valid by parsing the command line.
The function has the prototype:
void ValidateCommand ( EXITPARAM *lpep );
where:
DwSize The size of EXITPARAM to assure correct compatibility.
DwMapInstance Used as input, a unique identifier based on an instance of a particular map.
LpszCmdLine Used as input, the command line for the card (if using a 1.4 style command line). Mutually exclusive with
lpCmdStruct.
UretryCount Used as input, a retry count specified by the user.
UretryInterval Used as input, a retry interval (in seconds) specified by the user.
Brollback Used as input, whether or not the user specified rollback.
Nreturn Used as output, contains the return code representing the validity of the command line.
SzErrMsg Used as output, contains the string message based on nReturn.
LpCmdStruct Used as input, the command structure for the card (if using 2.0 style commands). Mutually exclusive with
lpszCmdLine. [Not supported for 2.0]