function testdll(sql:string;i :integer):string ;stdcall;
begin
 testdll:=sql;
end;
exports
testdll;
函数如上所写,但是在pb或vb中就是不能调用,如果将函数更改为:function testdll(sql:string):integer;stdcall;
begin
 testdll:=0;
end;
exports
testdll;
就可以调用,也即是说:
只要参数中存在二个或返回值中是string类型就不能调用

解决方案 »

  1.   

    String 是 Delphi 中的数据类型,用 PChar 更好一些。
      

  2.   

    同意楼上的。PChar是指针,String仅仅是Delphi所特有的。
      

  3.   

    没错,我已经解决,就是将string 改为pchar
      

  4.   


    要注意数据类型的兼容,据我所知delphi的数据类型是最多的,只是为了兼容各种语言,所以就形成了一大堆特有的数据类型.
      

  5.   

    String  --> WideString