M mingzy Unregistered / Unconfirmed GUEST, unregistred user! 2010-12-09 #1 int _stdcal getinfo(char * info)这个函数在delphi下应该如何定义,info用来返回厂家信息
K kk2000 Unregistered / Unconfirmed GUEST, unregistred user! 2010-12-09 #2 varinfo: PChar;begin getMem(info, ASize); getinfo(info) freeMem(info);end;
M mingzy Unregistered / Unconfirmed GUEST, unregistred user! 2010-12-09 #3 我是想问int _stdcal getinfo(char * info)这个函数在delphi下对应的写法是什么,如何能让info当做一个参数进行输出
K kk2000 Unregistered / Unconfirmed GUEST, unregistred user! 2010-12-09 #4 funtion getinfo(info: PChar): integer; stdcall;哈哈, 理解错你的意思
M mingzy Unregistered / Unconfirmed GUEST, unregistred user! 2010-12-09 #5 我也是这么定义的,能举个例子吗,info返回是乱码,例如返回信息为“北京XX公司”,谢谢
K kk2000 Unregistered / Unconfirmed GUEST, unregistred user! 2010-12-09 #6 funtion getinfo(info: PChar): integer; stdcall; external 你的DLLName;var info: PChar;begin getMem(info, ASize); fillchar(info, ASize, #0); getinfo(info); //这里就是调用了 freeMem(info);end;
funtion getinfo(info: PChar): integer; stdcall; external 你的DLLName;var info: PChar;begin getMem(info, ASize); fillchar(info, ASize, #0); getinfo(info); //这里就是调用了 freeMem(info);end;
M mingzy Unregistered / Unconfirmed GUEST, unregistred user! 2010-12-09 #7 function GetInfo(Infochar):Integer;stdcall; //信息 begin try Info:=pchar('333'); Result:=0; except Result:=-1; end;end;提示value assigned to 'info'nerver uesd,这样定义的函数还是不对,如何能让调用的时候info返回“333”
function GetInfo(Infochar):Integer;stdcall; //信息 begin try Info:=pchar('333'); Result:=0; except Result:=-1; end;end;提示value assigned to 'info'nerver uesd,这样定义的函数还是不对,如何能让调用的时候info返回“333”