大家知道很多编程语言都可以开发 Tuxedo  客户端;Delphi ,PB,Vc,BCB 
等等。 
今天就将用BCB 开发Tuxedo 客户端的心得体会写出来,与大家共同探讨。 
机器配置:win2k 、Tuxedo7.1、BCB6.0; 
通常要做以下5 步: 
1、把%TuxedoDir%\bin目录下的wtuxws32.dll用BCB自带的 implib 生成 wtuxws32.lib; 
方法是implib wtuxws32.lib wtuxws32.dll,这样就生成了符合 BCB的链接库wtuxws32.lib 。 
2 、把这个wtuxws32.lib 加到BCB的project 中(Project --> Add to Project) 。 
3、在实现单元(如unit1.cpp) 中要#include "atmi.h", 当然你必须在project->option-> directories/conditional->include path 中加入%TuxedoDir%\inlude 这个目录。 
4 、在调用 Tpinit  之前,必须加两条语句:tuxp utenv("WSWADDR=//ip:端口"); 
tuxputenv("WSENVFILE=");
5、很关键,必须在服务器端的Tuxconfig 文件中的SERVICES 节点后加入: 
WSL SRVGRP=GROUP1 SRVID=10 CLOPT="-t -- -n //192.168.0.236:6677"
  (注:192.168.0.236 是服务器断的ip 地址,6677 是端口号);其次要在MACHINE节点后面加入MAXWSCLIENTS =5,可以不是5,但一定要非0 ;这一步很重要,否则客户端始终连接不了服务器的应用。 
如果不成功,可以察看C:\根目录下的ULOG.XXXX ,里面会有详细的出错信息。 
下面贴一段我用BCB 改造的SimpApp: 
#include <vcl.h>
#pragma hdrstop
#include "atmi.h"
#include "Unit1.h"
//---------------------------------------------------------------------------
#pragma package (smart_init)
#pragma resource "*.dfm"
TForm1 *Form1;
//---------------------------------------------------------------------------
__fastcall TForm1::TForm1(TComponent* Owner)
: TForm(Owner)
{
}
//---------------------------------------------------------------------------
void __fastcall TForm1::Button1Click(TObject *Sender)
{ char *sendbuf, *rcvbuf;
      long sendlen, rcvlen;
      int ret;
      tuxputenv("WSNADDR=//192.168.0.235:6677");
      tuxputenv("WSENVFILE=");
      if (tpinit(NULL)==- 1)
      {
            Panel1->Caption = "error";
      }
      else
      {
            Panel1->Caption = "ok";
            sendlen = LabeledEdit1->Text.Length();
            if((sendbuf = (char *) tpalloc("STRING", NULL, sendlen+1)) == NULL)
            {
                  ShowMessage("分配发送存贮空间失败!!") ;
                  tpterm();
            }
            if((rcvbuf = (char *) tpalloc("STRING", NULL, sendlen+1)) == NULL)
            {
                  ShowMessage("分配接受存贮空间失败!!") ;
                  tpfree(sendbuf);
                  tpterm();
            }
            StrCopy(sendbuf,(LabeledEdit1->Text).c_str());
            ret = tpcall("TOUPPER", sendbuf, 0, &rcvbuf, &rcvlen, 0);
            if (ret == - 1)
            { ShowMessage("调用服务失败");
                  tpfree(sendbuf);
                  tpfree(rcvbuf);
                  tpterm();
                  Abort();
            }
            LabeledEdit2->Text = StrPas(rcvbuf);
            tpfree(sendbuf);
            tpfree(rcvbuf);
            tpterm();
      }
}
希望对大家有帮助!!-------------------------------------------------------------------------- 
#pragma package(smart_init)
#pragma resource "*.dfm"
TForm1 *Form1;
//---------------------------------------------------------------------------
__fastcall TForm1::TForm1(TComponent* Owner)
: TForm(Owner)
{
}
//------