⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 gettimecl.c

📁 电力与银行通讯的源码 1.应用tuxedo中间件. 2.与银行的前置机通讯. 3.proc*c 的应用
💻 C
字号:
#include <stdio.h> #include "atmi.h"   #if defined(__STDC__) || defined(__cplusplus)main(int argc,char *argv[])#elsemain(argc,argv)int argc;char *argv[];#endif{    long reqlen=1024;    char *reqbuf;     /* Attach to System/T as a Client Process */   if (tpinit((TPINIT *) NULL) == -1)    {         (void) fprintf(stderr, "Tpinit failed\n");         exit(1);     }     /* Allocate STRING buffers for the request and the reply */    reqbuf = (char *)tpalloc("STRING",NULL,reqlen);     if ( reqbuf == (char *)NULL)     {          printf("tpalloc failed\n");          tpterm();      }      /*invoke tuxedo service MGETTIME*/      if (tpcall("MGETTIME", NULL, 0L,(char **)&reqbuf, (long *)&reqlen, (long)0 ))      {            printf("tpcall failed,tperrno=%ld,tperrtext=%s\n",tperrno,tpstrerror(tperrno));            tpfree(reqbuf);            tpterm();            exit(1);       }       printf("Time=%s\n",reqbuf);       tpfree(reqbuf);       tpterm();       return(0); } 

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -