我封装函数:
function test(stmp:Pchar):Pchar;stdcall;
begin
s := Pchar(stmp);
TmpStr:='';
for i:=1 to Length(s)do
TmpStr:=TmpStr+IntToHex(ord(s[i]),2);
Result:= Pchar(TmpStr);
end;只要我加载这个DLL,都出那个错误呀,,
function test(stmp:Pchar):Pchar;stdcall;
begin
s := Pchar(stmp);
TmpStr:='';
for i:=1 to Length(s)do
TmpStr:=TmpStr+IntToHex(ord(s[i]),2);
Result:= Pchar(TmpStr);
end;只要我加载这个DLL,都出那个错误呀,,
这是啥,stmp已经是pchar了,而且你确认是这个过程出错吗
如:
function GetComputerName(var lpBuffer:PChar;lpnSize: DWORD): Boolean;