在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
procedure VariantToStream (const v :olevariant; Stream : TMemoryStream);
var p : pointer; begin Stream.Position := 0; Stream.Size := VarArrayHighBound (v, 1) - VarArrayLowBound(v, 1) + 1; p := VarArrayLock (v); Stream.Write (p^, Stream.Size); VarArrayUnlock (v); Stream.Position := 0; end; Stream 转换成 Variant 的函数
procedure StreamToVariant (Stream : TMemoryStream; var v : OleVariant);
var p : pointer; begin v := VarArrayCreate ([0, Stream.Size - 1], varByte); p := VarArrayLock (v); Stream.Position := 0; Stream.Read (p^, Stream.Size); VarArrayUnlock (v); end; |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论