[Lazarus] Copy buffer of PWord to TMemoryStream
Joao Morais
jcmoraisjr at gmail.com
Sun Mar 24 19:19:11 CET 2013
2013/3/24 Leonardo M. Ramé <l.rame at griensu.com>:
> Hi, I'm copying a buffer of PWord to a TMemoryStream using this code:
>
> lTmpBuff := lBuffer;
> I := 0;
> while I < lBufSize do
> begin
> lStream.Write(lTmpBuff^, SizeOf(PWord));
> inc(lTmpBuff, 1);
> inc(I, 1);
What about:
inc(lTmpBuff, SizeOf(PWord));
inc(I, SizeOf(PWord));
Joao Morais
More information about the Lazarus
mailing list