[fpc-devel] Readonly Memory Stream?

Yuriy Sydorov jura at cp-lab.com
Wed Feb 13 12:12:23 CET 2019


On 13.02.2019 11:40, LacaK wrote:
> and in code I use for example:
> 
>      MS := TStaticMemoryStream.Create;
>      MS.SetPointer(buffer, bufferLen);
>      MS.Position := 0;
>      Bitmap.LoadFromStream(MS);
>      MS.Free;

Btw, you can omit "MS.Position := 0;", since it is already zero for a new stream.

Yuriy.



More information about the fpc-devel mailing list