W
wzs
Unregistered / Unconfirmed
GUEST, unregistred user!
一维数组处理:
var
LData : OleVariant;
p ointer;
LDataPacket : array[0..? - 1] of Byte;
begin
LData :=ClientDataSet1.Data;
P := VarArrayLock(LData);
Move(P^,LDataPacket,ClientDataSet1.DataSize);
VarArrayUnlock(LData);
if ClientSocket1.Socket.SendBuf(LDataPacet,SizeOf(LDataPacket)) > 0 then
...;
end;
二维多维数组: ???????
var
LData:Olevariant;
begin
LData := VarArrayCreate([0,2],VarVariant);
LData[0] := '1111111111111';
LData[1] := 2;
LData[2] := LClientData1.Data;
.....
该怎么编写 . 求通用写法
1: 关键点 DataSize ,(判断类型求大小?!)
2: OleVariant的存储方式
2: DCom中有接口可传,没时间研究,希望有经验的高人指点,不胜感激!!