1 / 21
文档名称:

TUXEDO与在PB的调用.doc

格式:doc   大小:122KB   页数:21页
下载后只包含 1 个 DOC 格式的文档,没有任何的图纸或源代码,查看文件列表

如果您已付费下载过本站文档,您可以点这里二次下载

分享

预览

TUXEDO与在PB的调用.doc

上传人:buxiangzhid56 2022/6/19 文件大小:122 KB

下载得到文件列表

TUXEDO与在PB的调用.doc

相关文档

文档介绍

文档介绍:
BCB 客户端 tuxedo 开发实例
关键字   tuxedo,tpinit,tpcaNTRY *
Foccur32)( FBFR32 _TM_FA

R *,
    FLDID32);
HMODULE hLibfml32; // 动态库句柄
HMODULE hWtuxws32; // 动态库句柄
}FUNTUXEDO,*PFUNTUXEDO;
    这里,我将两个动态库句柄加入到了结构中,是因为我打算动态使用
   
   tuxedo中间件。方便我释放他们。,下一节介绍装载/释放他们
  
4 装载、释放中间件(基于FUNTUXEDO结构)
   哈,这很容易,主要用到LoadLibrary,FreeLibrary,GetProcAddress
  
   三个函数。装载代码如下:
  
    PFUNTUXEDO pFun;      
    //Loading Fchg32, Fget32 by
    pFun->hLibfml32 = LoadLibrary("");
    if (pFun->hLibfml32 == NULL)
    {
     return -1;
    }
   
    (FARPROC &)pFun->Fchg32
     =(FARPROC)GetProcAddress(pFun->hLibfml32,"Fchg32");
    (FARPROC &)pFun->Fget32
     =(FARPROC)GetProcAddress(pFun->hLibfml32,"Fget32");
(FARPROC &)pFun->Foccur32
     =(FARPROC)GetProcAddress(pFun->hLibfml32,"Foccur32");       
           
    if (pFun->Fchg32 == NULL || pFun->Fget32 == NULL || pFun->Foccur32 == NULL)
    {
     FreeLibrary(pFun->hLibfml32);
        pFun->hLibfml32 = NULL;
     return -2;
    }
//Loading tpacall, tpalloc, tpfree, tpinit, tpterm by
pFun->hWtuxws32 = LoadLibrary("");
    if (pFun->hWtuxws32 == NULL)
    {
     FreeLibrary(pFun->hLibfml32);
        pFun->hLibfml32 = NULL;       
     return -3;
    }   
       
    (FARPROC &)pFun->tpcall
     =(FARPROC)GetProcAddress(pFun->hWtuxws32,"tpacall");                                 
    (FARPROC &)pFun->tpalloc
     =(FARPROC)GetProcAddress(pFun->hWtuxws32,"tpalloc");
    (FARPROC &)pFun->tpfree
     =(FARPROC)GetProcAddress(pFun->hWtuxws32,"tpfree");
    (FARPROC &)pFun->tpinit
     =(FARPROC)GetProcAddress(pFun->hWtuxws32,"tpinit");
    (FARPROC &)pFun->tpterm
     =(FARPROC)GetProcAddress(pFun->hWtuxws32,"tpterm");