D
DickWu
Unregistered / Unconfirmed
GUEST, unregistred user!
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.Size := VarArrayHighBound (v, 1) - VarArrayLowBound (v, 1) + 1;
这句的时候出错,分解上面的语句后,发现是执行
VarArrayHighBound (v, 1)的时候出错,然后函数退出了,
出错信息是似乎是 InValid argument
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.Size := VarArrayHighBound (v, 1) - VarArrayLowBound (v, 1) + 1;
这句的时候出错,分解上面的语句后,发现是执行
VarArrayHighBound (v, 1)的时候出错,然后函数退出了,
出错信息是似乎是 InValid argument