A
appfirst
Unregistered / Unconfirmed
GUEST, unregistred user!
给你翻译了一下。
type
PHistoryEvent=^THistoryEvent;
THistoryEvent = packed record
EventID: Smallint;
CtrlAddress: Smallint;
PointAddress: Smallint;
CardZone: Integer;
CardNo: Integer;
LinkageNo: Smallint;
UserZone: Smallint;
EventTime: TDateTime;
end;
THistoryEvents=Array of THistoryEvent;
procedure GetHistoryData(NodeID:WORD; HistoryEventsSAFEARRAY; Dataset:TDataset; Var Proccessed:Boolean);
Var
i,iCount,iContents:Integer;
Flags:LONGINT;
phes:THistoryEvents;
bSuccessed:Boolean;
begin
iCount:=HistoryEvents.rgsabound[0].cElements;
phes:=THistoryEvents(HistoryEvents.pvData);
bSuccessed:=TRUE;
Flags:=0;
for i:=0 to iCount-1 do
begin
Dataset.Append;
Dataset.FieldByName('MessageID').Value:=phes.EventID;
Dataset.FieldByName('CardID').Value:=phes.CardNo;
Dataset.FieldByName('CardZoneID').Value:=phes.CardZone;
Dataset.FieldByName('PointAddress').Value:=phes.PointAddress;
Dataset.FieldByName('EventTime').Value:=phes.EventTime;
Dataset.FieldByName('controlMachineAddress').Value:=phes.CtrlAddress;
Dataset.Post;
end;
end;
type
PHistoryEvent=^THistoryEvent;
THistoryEvent = packed record
EventID: Smallint;
CtrlAddress: Smallint;
PointAddress: Smallint;
CardZone: Integer;
CardNo: Integer;
LinkageNo: Smallint;
UserZone: Smallint;
EventTime: TDateTime;
end;
THistoryEvents=Array of THistoryEvent;
procedure GetHistoryData(NodeID:WORD; HistoryEventsSAFEARRAY; Dataset:TDataset; Var Proccessed:Boolean);
Var
i,iCount,iContents:Integer;
Flags:LONGINT;
phes:THistoryEvents;
bSuccessed:Boolean;
begin
iCount:=HistoryEvents.rgsabound[0].cElements;
phes:=THistoryEvents(HistoryEvents.pvData);
bSuccessed:=TRUE;
Flags:=0;
for i:=0 to iCount-1 do
begin
Dataset.Append;
Dataset.FieldByName('MessageID').Value:=phes.EventID;
Dataset.FieldByName('CardID').Value:=phes.CardNo;
Dataset.FieldByName('CardZoneID').Value:=phes.CardZone;
Dataset.FieldByName('PointAddress').Value:=phes.PointAddress;
Dataset.FieldByName('EventTime').Value:=phes.EventTime;
Dataset.FieldByName('controlMachineAddress').Value:=phes.CtrlAddress;
Dataset.Post;
end;
end;