流与变体之间的转换
function StreamToVariant(Stream: TStream): Variant;
var
p: Pointer;
begin
Result := VarArrayCreate([0, Stream.Size - 1], varByte);
p := VarArrayLock(Result);
try
Stream.position := 0;
Stream.Read(p^, Stream.Size)
finally
VarArrayUnlock(Result);
end;
end;
无
《学习大师原创文档,请勿转载,侵权必究》