How I can assign a value to a Olevariant variable wich comes from a TStream?

You can use the VarArrayLock function to get a pointer to the OleVariant data and then read to this pointer.

You can use the VarArrayLock function to get a pointer to the OleVariant data and then read to this pointer. Check this code wich use a VarArray of varByte elements. Var MemoryStream : TMemoryStream; Data : OleVariant; DataPtr : Pointer; begin MemoryStream:=TMemoryStream.

Create; try FuncFill(MemoryStream); //Filling the stream MemoryStream. Seek(0,0); Data :=VarArrayCreate(0, MemoryStream. Size - 1, varByte); DataPtr :=VarArrayLock(Data); try MemoryStream.

ReadBuffer(DataPtr^,MemoryStream. Size); //Get the pointer to the variant variable. Finally VarArrayUnlock(Data); //when you are done , you must call to VarArrayUnlock end; finally MemoryStream.

Free; end; end.

You have to set Data to an array of the right size! So first do Data := VarArrayCreate(0, MemoryStream. Size - 1, varByte);, then continue with DataPtr := VarArrayLock(Data); – The_Fox Nov 19 '10 at 15:56 Thanks, I forgot put that line in the code.

Code edited. – RRUZ Nov 19 '10 at 16:04.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions