我需要直接从驱动器读取文件,而不需要任何系统缓冲。我在这里尝试了这段代码,不幸的是我得到了错误信息"Out of memory expanding stream“。我尝试过的任何文件都会发生这种情况。后来我注意到SrcStream.Size总是返回值-1。所以很明显,问题就在这里,问题是为什么会发生这种情况?
uses
MMSystem;
function GetTimeForRead(ABuffered: boolean): single;
const
FileToRead = // name of file with maybe 500 MByte size
var