写了个函数,如下:
function aabb(iistr: PChar): Integer; stdcall;implementationfunction aabb(iistr: PChar): Integer;
begin
     Result := 1;
end;
加上声明,如下:
     Unit1 in 'Unit1.pas';{$R *.res}
exports aabb;编译后调用,运行出错。
跟踪源码,发现传进来的的参数值是乱码。调用是这样写的:
function aabb(ii: pchar): Integer; external 'Project1.dll';aabb('test');
过程就是这样。
不知道是错在哪里。
delphi 7(build 8.1)