文档介绍:
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");