- 论坛徽章:
- 0
|
#include <stdio.h>
#include <xa.h>
#include <atmi.h>
#if defined(__cplusplus)
extern "C" {
#endif
extern int _tmrunserver _((int));
extern void dy_transaction _((TPSVCINFO *));
extern void no_transaction _((TPSVCINFO *));
extern void os_transaction _((TPSVCINFO *));
extern void pt_transaction _((TPSVCINFO *));
extern void sl_transaction _((TPSVCINFO *));
#if defined(__cplusplus)
}
#endif
static struct tmdsptchtbl_t _tmdsptchtbl[] = {
{ (char*)"dy_transaction", (char*)"dy_transaction", (void (*)
_((TPSVCINFO *))) dy_transaction, 0, 0 },
{ (char*)"no_transaction", (char*)"no_transaction", (void (*)
_((TPSVCINFO *))) no_transaction, 1, 0 },
{ (char*)"os_transaction", (char*)"os_transaction", (void (*)
_((TPSVCINFO *))) os_transaction, 2, 0 },
{ (char*)"pt_transaction", (char*)"pt_transaction", (void (*)
_((TPSVCINFO *))) pt_transaction, 3, 0 },
{ (char*)"sl_transaction", (char*)"sl_transaction", (void (*)
_((TPSVCINFO *))) sl_transaction, 4, 0 },
{ NULL, NULL, NULL, 0, 0 }
};
#ifndef _TMDLLIMPORT
#define _TMDLLIMPORT
#endif
#if defined(__cplusplus)
extern "C" {
#endif
_TMDLLIMPORT extern struct xa_switch_t tmnull_switch;
#if defined(__cplusplus)
}
#endif
typedef void (*tmp_void_cast)();
typedef void (*tmp_voidvoid_cast)(void);
typedef int (*tmp_intchar_cast)(int, char **);
typedef int (*tmp_int_cast)(int);
static struct tmsvrargs_t tmsvrargs = {
NULL,
&_tmdsptchtbl[0],
0,
(tmp_intchar_cast)tpsvrinit,
(tmp_voidvoid_cast)tpsvrdone,
(tmp_int_cast)_tmrunserver, /* PRIVATE */
NULL, /* RESERVED */
NULL, /* RESERVED */
NULL, /* RESERVED */
NULL, /* RESERVED */
(tmp_intchar_cast)tpsvrthrinit,
(tmp_voidvoid_cast)tpsvrthrdone
};
struct tmsvrargs_t *
#ifdef _TMPROTOTYPES
_tmgetsvrargs(void)
#else
_tmgetsvrargs()
#endif
{
tmsvrargs.reserved1 = NULL;
tmsvrargs.reserved2 = NULL;
tmsvrargs.xa_switch = &tmnull_switch;
return(&tmsvrargs);
}
int
#ifdef _TMPROTOTYPES
main(int argc, char **argv)
#else
main(argc,argv)
int argc;
char **argv;
#endif
{
#ifdef TMMAINEXIT
#include "mainexit.h"
#endif
return( _tmstartserver( argc, argv, _tmgetsvrargs()));
}
*************************************************
问题:
1.这段代码可以实现什么功能?
2._tmstartserver 这个是tuxedo提供的函数吗?有何功能? |
|