怎样把array of cardianl转换成olevariant类型(70分)

  • 主题发起人 主题发起人 迷惘的人
  • 开始时间 开始时间

迷惘的人

Unregistered / Unconfirmed
GUEST, unregistred user!
VarArrayCreate([1, 1000], varByte);
 
这个olevariant是在单元PView_TLB中声明的:
Unit PView_TLB;
..............
property Colors:OleVariant Read Get_Colors Write Set_colors;
..............
end;
PView_TLB是VB程序提供的一个可编程文件(是不是叫Pascal外套?),我想给属性colors
赋一个整数数组,hfghfghfg提供的方法好像不行。
 
Data: oleVariant;
Data := VarArrayCreate([1, 1000], varByte);
for i := 1 to 1000 do
begin
Data := ???;
end;
 
运行时报错:
Access violation at address 01607028 in module 'pview1.dll' .Read of address
00002003
这怎么办?
 
多人接受答案了。
 
后退
顶部