[Top] [Prev] [Next] [Bottom]

AEOaddtypesw(3)

AEOaddtypesw(3)

Name

AEOaddtypesw(3)-install or replace 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 system. For new buffer types, make sure that the WSH(1) and other BEA TUXEDO 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 system's defined buffer type routines. The application and the BEA TUXEDO system's buffer routines can be intermixed in one user defined buffer type.

Return Values

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

Errors

Under the following condition, AEOaddtypesw() fails and sets tperrno to:

[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 system typeswitch DLL. Please refer to the BEA TUXEDO Administrator's Guide 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

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



[Top] [Prev] [Next] [Bottom]