其部分代码如下:
 
 TGgSqDll = class(TAutoObject, IGgSqDll)
  private
    GgDq,GgDqBs,GgMq,GgMqBs,BwLxS,BwHdS,BhLxS,BhHdS,BhMqLx,BhMqBs:String;
  protected
    procedure CreateFrmMethod; safecall;
    procedure ShowModalMethod; safecall;
    function Get_GgDq: WideString; safecall;
    function Get_GgMq: WideString; safecall;
    procedure Set_GgDq(const Value: WideString); safecall;
    procedure Set_GgMq(const Value: WideString); safecall;
    function Get_BwLx: WideString; safecall;
    procedure Set_BwLx(const Value: WideString); safecall;
    function Get_BwHd: WideString; safecall;
    procedure Set_BwHd(const Value: WideString); safecall;
    function Get_BhLx: WideString; safecall;
    procedure Set_BhLx(const Value: WideString); safecall;
    function Get_BhHd: WideString; safecall;
    procedure Set_BhHd(const Value: WideString); safecall;
    function Get_BhMqLx: WideString; safecall;
    procedure Set_BhMqLx(const Value: WideString); safecall;
    function Get_BHMqBs: WideString; safecall;
    procedure Set_BHMqBs(const Value: WideString); safecall;
    function Get_GgDqBs: WideString; safecall;
    function Get_GgMqBs: WideString; safecall;
    procedure Set_GgDqBs(const Value: WideString); safecall;
    procedure Set_GgMqBs(const Value: WideString); safecall;
  end;
  
 TTfSqDll = class(TAutoObject, ITfSqDll)
  private
    TfDq,TfDqBs,TfMq,TfMqBs,TfBwLx,TfBwHd,TfBhLx,TfBhMqLx,TfBhMqBs,TfXgDq,TfXgDqBs:String;
    TfXgMq,TfXgMqBs:String;
  protected
    procedure CreateFrmMethod; safecall;
    procedure ShowModalMethod; safecall;
    function Get_DqLx: WideString; safecall;
    procedure Set_DqLx(const Value: WideString); safecall;
    function Get_DqBs: WideString; safecall;
    procedure Set_DqBs(const Value: WideString); safecall;
    function Get_MqLx: WideString; safecall;
    procedure Set_MqLx(const Value: WideString); safecall;
    function Get_MqBs: WideString; safecall;
    procedure Set_MqBs(const Value: WideString); safecall;
    function Get_BwLx: WideString; safecall;
    procedure Set_BwLx(const Value: WideString); safecall;
    function Get_BhLx: WideString; safecall;
    procedure Set_BhLx(const Value: WideString); safecall;
    function Get_BhMqLx: WideString; safecall;
    procedure Set_BhMqLx(const Value: WideString); safecall;
    function Get_BhMqBs: WideString; safecall;
    procedure Set_BhMqBs(const Value: WideString); safecall;
    function Get_XgDqLx: WideString; safecall;
    procedure Set_XgDqLx(const Value: WideString); safecall;
    function Get_XgDqBs: WideString; safecall;
    procedure Set_XgDqBs(const Value: WideString); safecall;
    function Get_XgMqLx: WideString; safecall;
    procedure Set_XgMqLx(const Value: WideString); safecall;
    function Get_XgMqBs: WideString; safecall;
    procedure Set_XgMqBs(const Value: WideString); safecall;
  end;
implementationuses ComServ,GgSyBw,TfSqBw;

解决方案 »

  1.   

    其中TGgSqDll是我在新建向导中建的,TTfSqDll是我在Type  Library编辑界面中增加的。
      

  2.   

    TTfSqDll还是应该在同一个ActiveX Libray中使用向导Automaticon Object创建。这样会自动在类型库中添加TTfSqDll。这样可以注册两个自动化对象。—————————————————————————————————
    宠辱不惊,看庭前花开花落,去留无意;毁誉由人,望天上云卷云舒,聚散任风。
    —————————————————————————————————