Ad blocker interference detected!
Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers
Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.
TMemoryStream is descendant of TStream class for manipulating data in memory. This class introduce read-only property called Memory which is pointer type so you can get direct access to memory maintained by TMemoryStream.
(Known issues / Documentation clarifications / Things to be aware of)
Load data from file to memory
procedure LoadFromFileToMem(const filename:string; memStream:TMemoryStream); var afileStream:TFileStream; begin afileStream:=TFileStream.Create(filename,fmOpenRead); try memStream.CopyFrom(afileStream); finally afileStream.Free; end; end;
... var memStream:TMemoryStream; ... memStream:=TMemoryStream.Create; try LoadFromFileToMem('C\my file.dat',memStream); finally memStream.Free; end; mo funciona
(Please leave your name with your comment.)