在动态链接库中有没有先执行过CoInitialize(nil)uses ActiveX;//.......
CoInitialize(nil);
//...........之后再做你的初始化工作

解决方案 »

  1.   

    to :Crob(我干嘛这么帅)
    procedure Trecordset.Initialize;
    begin
      inherited;
      cn:=TADOConnection.create(Forms.application);  
      ds:=TADODataSet.Create(Forms.application);
    end;destructor Trecordset.Destroy;
    begin
      inherited;
      cn.Free;
      ds.Free;
    end;
    不知道这是不是你说的初始化工作呢,我也将它释放了。谢谢你的回复.
      

  2.   

    uses ActiveX;procedure Trecordset.Initialize;
    begin
      inherited;
      CoInitialize(nil);//------------
      cn:=TADOConnection.create(Forms.application);  
      ds:=TADODataSet.Create(Forms.application);
    end;destructor Trecordset.Destroy;
    begin
      inherited;
      cn.Free;
      ds.Free;
      CoUninitialize(); //------------
    end;试试~~~~~~~~``
      

  3.   

    还是不行. :-(
    我想注册时缺少某些文件.
    错误提示是: The OLE control may possibly require support libraries that are not on the current search path or are not present on your system.
    Microsoft AtiveX Data Objects 2.x library(Version 2.x) 我选择的是2.7.
    不知这里会有什么要求.
    谢谢.