So, Frage geklärt:
Warum hab' ichs nich vorher entdeckt:
In der tollen Delphi-Hilfe steht nämlich:
ReadFile:
The ReadFile code to check for the end-of-file condition (eof) differs for synchronous and asynchronous read operations.
[...]
When a synchronous read operation reaches the end of a file, ReadFile returns TRUE and sets *lpNumberOfBytesRead to zero.
[...]
An asynchronous read operation can encounter the end of a file during the initiating call to ReadFile, or during subsequent asynchronous operation.
If EOF is detected at ReadFile time for an asynchronous read operation, ReadFile returns FALSE and GetLastError returns ERROR_HANDLE_EOF.
If EOF is detected during subsequent asynchronous operation, the call to GetOverlappedResult to obtain the results of that operation returns FALSE and GetLastError returns ERROR_HANDLE_EOF.
To cancel all pending asynchronous I/O operations, use the CancelIO function. This function only cancels operations issued by the calling thread for the specified file
handle. I/O operations that are canceled complete with the error ERROR_OPERATION_ABORTED.
Das müsste es sein. Ich werde mein Programm dann wohl in den nächsten Stunden/Tagen veröffentlichen.
mfg
Daniel