A
alpfeng
Unregistered / Unconfirmed
GUEST, unregistred user!
其中C转换为delphi的函数定义为:
type
P_portDscr_=^_portDscr_;
_portDscr_=record
Index:Integer
OperStatus:integer
InOctetsWord
InPktsWord;
OutOctetsWord;
OutPktsWord
pri_portDscr_
next_portDscr_
end;
DATA=_portDscr_;
P_FLUXData_=^_FLUXData_;
_FLUXData_=record
lpDATAATA;
end;
RETURNFLUX=_FLUXData_;
function getPortDecr(strIpchar;strPwdchar):RETURNFLUX
stdcall;
implementation
function getPortDecr;external 'SnmpFlux.DLL' name 'getPortDecr';
现在要在delphi中调用该函数,我的类型定义如下:
type
Point =^structDATA;
structDATA = Record
Index: integer;
OperStatus: integer;
InOctets :dword;
InPkts :dword;
OutOctets :dword;
OutPkts :dword;
Pri: Point;
Next: Point;
end;
returnPoint=^structRETURNFLUX;
structRETURNFLUX = Record
lpDATA: Point;
end;
................
procedure TForm1.Button1Click(Sender: TObject);
var
ip,pwd:string;
a : array [1..20] of Char;
b : array [1..20] of Char;
i,j:integer;
stripchar;
strpwdchar;
index:integer;
OperStatus:integer;
StartPosoint;
ReturnPos:returnPoint;
begin
............//调用dll函数,取出结构体中定义的各项值:
end;
请问上面的函数调用应该怎么写。急求啊,100分奉上:
type
P_portDscr_=^_portDscr_;
_portDscr_=record
Index:Integer
OperStatus:integer
InOctetsWord
InPktsWord;
OutOctetsWord;
OutPktsWord
pri_portDscr_
next_portDscr_
end;
DATA=_portDscr_;
P_FLUXData_=^_FLUXData_;
_FLUXData_=record
lpDATAATA;
end;
RETURNFLUX=_FLUXData_;
function getPortDecr(strIpchar;strPwdchar):RETURNFLUX
stdcall;
implementation
function getPortDecr;external 'SnmpFlux.DLL' name 'getPortDecr';
现在要在delphi中调用该函数,我的类型定义如下:
type
Point =^structDATA;
structDATA = Record
Index: integer;
OperStatus: integer;
InOctets :dword;
InPkts :dword;
OutOctets :dword;
OutPkts :dword;
Pri: Point;
Next: Point;
end;
returnPoint=^structRETURNFLUX;
structRETURNFLUX = Record
lpDATA: Point;
end;
................
procedure TForm1.Button1Click(Sender: TObject);
var
ip,pwd:string;
a : array [1..20] of Char;
b : array [1..20] of Char;
i,j:integer;
stripchar;
strpwdchar;
index:integer;
OperStatus:integer;
StartPosoint;
ReturnPos:returnPoint;
begin
............//调用dll函数,取出结构体中定义的各项值:
end;
请问上面的函数调用应该怎么写。急求啊,100分奉上: