(* should have valid pointer to buffer *)
// check if buffer is correctly set
IF Buffer.pStrBuf = 0 OR Buffer.BufferSize = 0 THEN
ReadFile := E_XmlError.ErrorNoBufferSet;
RETURN;
END_IF
// open file
// Everytime the next offset is added to the total offset to read the file in multiple steps.
iFileOffset := iFileOffset + udiNextOffset;
File.SetPos(TO___XWORD(iFileOffset));
END_IF