Skip navigation.

ATMI C Function Reference

  Previous Next vertical dots separating previous/next from contents/index/pdf Contents View as PDF   Get Adobe Reader

 


AEOaddtypesw(3c)

Name

AEOaddtypesw()—Installs or replaces a user-defined buffer type at execution time.

Synopsis

#include <atmi.h>  
#include <tmtypes.h>

int FAR PASCAL AEOaddtypesw(TMTYPESW *newtype)

Description

AEOaddtypesw() is an "ATMI Extension for OS/2" that allows an OS/2 client to install a new, or replace an existing, user-defined buffer type at execution time. The argument to this function is a pointer to a TMTYPESW structure that contains the information for the buffer type to be installed.

If the type() and the subtype() match an existing buffer type already installed, then all the information is replaced with the new buffer type. If the information does not match the type() and the subtype() fields, then the new buffer type is added to the existing types registered with the BEA Tuxedo ATMI system. For new buffer types, make sure that the WSH and other BEA Tuxedo ATMI system processes involved in the call processing have been built with the new buffer type.

The function pointers in the TMTYPESW array should appear in the Module Definition file of the application in the EXPORTS section.

The application can also use the BEA Tuxedo ATMI system's defined buffer type routines. The application and the BEA Tuxedo ATMI system's buffer routines can be intermixed in one user defined buffer type.

Return Values

Upon success, AEOaddtypesw() returns the number of user buffer types in the system Upon failure, AEOaddtypesw() returns -1 and sets tperrno to indicate the error condition.

Errors

Upon failure, AEOaddtypesw() sets tperrno to one of the following values:

[TPEINVAL]

AEOaddtypesw() was called and the type parameter was NULL.

[TPESYSTEM]

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

Portability

This interface is supported only in Windows clients. The preferred way to install a type switch is to add it to the BEA Tuxedo ATMI system type switch DLL. Please refer to Setting Up a BEA Tuxedo Application for more information.

Notices

FAR PASCAL is used only for the 16-bit OS/2 environment.

Examples

  #include <os2.h>
#include <atmi.h>
#include <tmtypes.h>

int FAR PASCAL Nfinit(char FAR *, long);
int (FAR PASCAL * lpFinit)(char FAR *, long);
int FAR PASCAL Nfreinit(char FAR *, long);
int (FAR PASCAL * lpFreinit)(char FAR *, long);
int FAR PASCAL Nfuninit(char FAR *, long);
int (FAR PASCAL * lpFuninit)(char FAR *, long);

TMTYPESW newtype =
{
"MYFML", "", 1024, NULL, NULL,
NULL, _fpresend, _fpostsend, _fpostrecv, _fencdec,
_froute
};

newtype.initbuf = Nfinit;
newtype.reinitbuf = Nfreinit;
newtype.uninitbuf = Nfuninit;

if(AEOaddtypesw(newtype) == -1) {
userlog("AEOaddtypesw failed %s", tpstrerror(tperrno));
}
int
FAR PASCAL
Nfinit(char FAR *ptr, long len)
{
......
return(1);
}

int
FAR PASCAL
Nfreinit(char FAR *ptr, long len)
{
......
return(1);
}

int
FAR PASCAL
Nfuninit(char FAR *ptr, long mdlen)
{
......
return(1);
}

The application Module Definition File:

  ; EXAMPLE.DEF file

NAME EXAMPLE

DESCRIPTION 'EXAMPLE for OS/2'

EXETYPE OS/2


EXPORTS
Nfinit
Nfreinit
Nfuninit
....

See Also

buildwsh(1), buffer(3c), typesw(5)

 

Skip navigation bar  Back to Top Previous Next