vc如何传递结构指针给delphi的dll
用delphi写了一个dll,其中一个函数参数就是一个结构指针,在delphi中调用正常,可是在vc中如何调用?
1、下面是dll中的声明
function fReadDomainList(pdomlist :pukeyDomainList):Integer;stdcall
2、这个是delphi程序中调用
function TfrmGroup.fReadFromUkey:Boolean;
var
pukey :pukeyDomainList;
i,cnt :Integer;
s :string;
begin
Result := False;
new(pukey);
fReadDomainList(pukey);
cnt := pukey^.ItemCnt;
for i := 0 to cnt -1 do
begin
s := IntToStr(pukey^.Item[i].Domainid) +'-'+pukey^.Item[i].Domainname;
ShowMessage(s);
end;
Dispose(pukey);
Result := True;
end;
不只,此函数如何在vc中调用?如何传结构指针?