![]() |
![]() |
|
|
tpconvert(3c)
Name
tpconvert()—Converts structures to/from string representations.
Synopsis
#include <atmi.h>
#include <xa.h>
int tpconvert(char *strrep, char *binrep, long flags)
Description
tpconvert() converts the string representation of interface structures (strrep) to or from the binary representation (binrep).
Both the direction of the conversion and the interface structure type are determined from the flags argument. To convert a structure from binary representation to string representation, the programmer must set the TPTOSTRING bit in flags. To convert a structure from string to binary the programmer must clear the bit. The following flags are defined to indicate the particular structure type to be converted; only one may be specified at a time:
For conversions from binary to string representation, strrep should be at least TPCONVMAXSTR characters in length.
Note that unequal string versions of TPTRANID and XID values may be considered equal by the system when accessing TM_MIB(5) classes that allow these values as key fields (for example, T_TRANSACTION or T_ULOG). Therefore, string values for these data types should not be fabricated or manipulated by application programs. TM_MIB(5) guarantees that only objects matching the global transaction identified by the string are returned when one of these values is used as a key field.
A thread in a multithreaded application may issue a call to tpconvert() while running in any context state, including TPINVALIDCONTEXT.
Return Values
Upon failure, tpconvert() returns -1 and sets tperrno() to indicate the error condition.
Errors
Under the following conditions, tpconvert() fails and sets tperrno() to one of the following values:
Portability
This interface is available only on BEA Tuxedo ATMI release 5.0 or later. This interface is available on workstation platforms.
See Also
tpresume(3c), tpservice(3c), tpsuspend(3c), tx_info(3c), TM_MIB(5)
![]() |
![]() |
![]() |
|
Copyright © 2001 BEA Systems, Inc. All rights reserved.
|