Initializes a new transaction message prior to adding components to the transaction message (with TCAPAddComp) and/or sending the transaction request with TCAPTransRqst.
DWORD TCAPInitTrans ( U8 *pMessage, TcapTransInfo *pTinfo, TcapDlgSect *pDlgPart, U16 userInfoLen, U8 *pUserInfo)
Argument |
Description |
pMessage |
Pointer to the address of the caller's message buffer, where the TCAP message is constructed. This buffer must be at least TCAP_MSG_SIZE bytes long (currently 1076). |
pTInfo |
Pointer to the address of the caller's TcapTransInfo buffer specifying the general characteristics of the transaction message. |
pDlgPart |
Pointer to the address of the caller's TcapDlgSect structure (optional). |
pUserInfoLen |
Byte length of user data to be included in the message (optional). |
pUserInfo |
Pointer to the address of the caller's user data to be included in the message. |
Return value |
Description |
TCAP_SUCCESS |
|
TCAP_OVERFLOW |
Caller's user information is too big for a TCAP message. |
TCAP_PARAM |
NULL pointer was passed for a required parameter. |
After successful completion of TCAPInitTrans, the caller can then call TCAPAddComp one or more times to add components to the transaction message. The application must then call TCAPTransRqst to send the constructed message to the TCAP layer.
For information about the structure of the transaction information block that is pointed to in pTinfo, refer to TCAP transaction information structure.
The dialog portion is valid only for ITU-92 or later and ANSI-96 or later protocols. If no dialog portion is in the outgoing message, a NULL pointer should be passed in pDlgPart. For information about the structure of the TcapDlgSect block, refer to TCAP dialog section structure.
The user information portion is valid only for ITU-92 or later and ANSI-96 or later protocols. For other protocol variants, or if no user data is included, a NULL pointer should be passed in pUserInfo and pUserInfoLen should be set to zero.
The application has 912 bytes in the message buffer to specify the dialog section, user information section, and components. If a dialog section is specified, about 600 bytes remain for the user information section, and the components and their parameters. Each component uses 88 bytes plus the size of its parameter.