dll代码如下(是一个最简短的一个返回字串的dll,我是学习书上写的): 
library xtSql; { Important note about DLL memory management: ShareMem must be the 
  first unit in your library's USES clause AND your project's (select 
  Project-View Source) USES clause if your DLL exports any procedures or 
  functions that pass strings as parameters or function results. This 
  applies to all strings passed to and from your DLL--even those that 
  are nested in records and classes. ShareMem is the interface unit to 
  the BORLNDMM.DLL shared memory manager, which must be deployed along 
  with your DLL. To avoid using BORLNDMM.DLL, pass string information 
  using PChar or ShortString parameters. } uses 
  SysUtils, 
  Classes; {$R *.res} 
 function GetSqlConnStr():string; stdcall; begin result:='Driver=SQL Server;Server=jerker;UID=sa;PWD=sa;DataBase=H_Jerker'; end; 
exports GetSqlConnStr; begin 
end. 
程序的部分代码如下: {$R *.dfm} 
    function GetSqlConnStr():string; stdcall; 
    external 'xtSQL.DLL' function GetConnString():string; 
begin 
      ShowMessage(GetSqlConnStr()); 
     GetConnString := 'Driver=SQL Server;Server=jerker;UID=sa;PWD=sa;DataBase=H_Jerker';      //GetConnString := GetSqlConnStr(); 
end; // 打开连接对象 
procedure ConnOpen(); 
begin 
  with Form_ResList do 
   begin 
      ADOConn_Manage.ConnectionString := GetConnString(); 
      ADOConn_Manage.LoginPrompt := false; 
      ADOConn_Manage.Connected := true; 
    end 
end; 
调用ConnOpen();的时候,就有错误, 
错误出现在ADOConn_Manage.ConnectionString := GetConnString(); 
ShowMessage(string(GetSqlConnStr()))能弹出信息;后就提示错误! 
去掉就一切正常! 
我是一个初学者,刚接触Delphi,所以拜托各位了!谢谢!