有一个dll 的定义
function SLT_ClientGetDevInfo(serverip:pchar;user:pchar;password:pchar;second:integer;notify:Tnotify):integer;stdcall; far external 'smartv.dll';
然后定义回调函数
procedure test(devid:dword;devicename:pchar;svrip:pchar):STDCALL;
begin
Form1.memo1.Lines.Add(devicename);
Form1.memo1.Lines.Add(inttostr(devid));
end;怎么把这个回调函数定义成 STDCALL 调用方式 ??
function SLT_ClientGetDevInfo(serverip:pchar;user:pchar;password:pchar;second:integer;notify:Tnotify):integer;stdcall; far external 'smartv.dll';
然后定义回调函数
procedure test(devid:dword;devicename:pchar;svrip:pchar):STDCALL;
begin
Form1.memo1.Lines.Add(devicename);
Form1.memo1.Lines.Add(inttostr(devid));
end;怎么把这个回调函数定义成 STDCALL 调用方式 ??
将我上次给的定义改成stdcall就可以了
type
Tnotify=procedure(devid:dword;devicename:pchar;svrip:pchar);stdcall;然后:
procedure test(devid:dword;devicename:pchar;svrip:pchar):STDCALL;
begin
...