BEA Logo BEA Tuxedo Release 7.1

  Corporate Info  |  News  |  Solutions  |  Products  |  Partners  |  Services  |  Events  |  Download  |  How To Buy

 

   Tuxedo Doc Home   |   Reference   |   Topic List   |   Previous   |   Next   |   Contents

   BEA Tuxedo C Function Reference

tptypes(3c)

Name

tptypes() - routine to determine information about a typed buffer

Synopsis

#include <atmi.h>
long tptypes(char *ptr, char *type, char *subtype)

Description

tptypes() takes as its first argument a pointer to a data buffer and returns the type and subtype of that buffer in its second and third arguments, respectively. ptr must point to a buffer gotten from tpalloc(). If type and subtype are non-NULL, then the function populates the character arrays to which they point with the names of the buffer's type and subtype, respectively. If the names are of their maximum length (8 for type, 16 for subtype), the character array is not null-terminated. If no subtype exists, then the array pointed to by subtype will contain a NULL string.

Note that only the first eight bytes of type and the first 16 bytes of subtype are populated.

A thread in a multithreaded application may issue a call to tptypes() while running in any context state, including TPINVALIDCONTEXT.

Return Values

Upon success, tptypes() returns the size of the buffer;

Upon failure, it returns -1 and sets tperrno() to indicate the error condition.

Errors

Upon failure, tptypes() sets tperrno() to one of the following values.

[TPEINVAL]

Invalid arguments were given (for example, ptr does not point to a buffer gotten from \% tpalloc()).

[TPEPROTO]

tptypes() was called improperly.

[TPESYSTEM]

A BEA Tuxedo system error has occurred. The exact nature of the error is written to a log file.

[TPEOS]

An operating system error has occurred.

See Also

tpalloc(3c), tpfree(3c), tprealloc(3c)