PvDataSet: TADODataSet) : TMemoryStream;
Var
AStream: _Stream;
V: OLEVariant;
P: Pointer;
The begin
AStream:=CoStream. Create;
OLEVariant (pvDataSet. You). The Save (AStream adPersistADTG);
AStream. Position:=0;
V:=AStream. Read (AStream. Size);
Result:=TMemoryStream. Create;
Try
P:=VarArrayLock (V);
Try
Result. The Size: VarArrayHighBound=(V, 1) + 1;
Move (P ^, result. ^, Memory result. The Size).
The finally
VarArrayUnLock (V);
end;
Except,
Result. The Free ();
Result:=nil;
Raise;
end;
end;
CodePudding user response:
The begin end is modified to {}. Changed to - & gt;
: amended as==