I have a question to transfer data (stream) in a flash.
I read forum, enjoyed the search, but the question remains open.
Sometimes when I convey the data in flash, using SetGlobalOnLoadExternalResourceHandler, I have an error occurs: "EWriteError with message 'Stream write error'".
Such a mistake can I cause, for example, blocking the computer (Win + L) during the handover flow into the flash.
The code (Delphi 7):
Code: Select all
while i> 0 do
begin
FlashMem.Clear;
FlashMem.Write (Buff, SizeOf (Buff));
nWrBytes: = Stream.Write (FlashMem.Memory^, FlashMem.Size);
if nWrBytes = 0 then break;
end;
FlashMem - TMemoryStream
Buff- array [1 .. 1024] of char
The problem happens rarely, but when it happens flash stops responding to events.
Code working, but I assume that something I missed all the same.
It is hope for your help.
Apologize for my poor English.
Thank you.