Questions tagged [cancelio]
6 questions
3
votes
4 answers
What if CancelIo fails?
There are a number of reasons to call CancelIo, but in my particular case I'm calling it in order to know that the system is no longer writing into a buffer. Once I know that, I can safely free the buffer.
But what if CancelIo fails? What I do now…

Integer Poet
- 747
- 5
- 19
2
votes
4 answers
How to find out when CancelIo() is done?
CancelIo() is supposed to cancel all pending I/O operations associated with the calling thread. In my experience, CancelIo() sometimes cancels future I/O operations as well. Given:
ReadFile(port, buffer, length, &bytesTransferred, overlapped);
If…

Gili
- 86,244
- 97
- 390
- 689
2
votes
1 answer
CancelIoEx : Function pointer typedef
The following code is copied from MS Async Filter. It is supposed that the following code is calling either CancelIo or CancelIoEx. I don't see where CancelIoEx is called in anyway. It is supposed that the typedef is representing the CancelIoEx but…

Maverick
- 1,105
- 12
- 41
1
vote
2 answers
What does CancelIo() do with bytes that have already been read?
What happens if I ReadFile() 10 bytes (in overlapped mode without a timeout) but invoke CancelIo() after 5 bytes have been read? The documentation for CancelIo() says that it cancels any pending I/O, but what happens to the 5 bytes already read? Are…

Gili
- 86,244
- 97
- 390
- 689
0
votes
1 answer
Functions CancelIO() and GetOverlappedResult() are missing from win32 api
I cannot find the function CancelIo and GetOverlappedResult
The function CancelIO is described as
The CancelIO function cancels all pending input and output (I/O) operations that were issued by the calling thread for the specified file handle. The…

user651659
- 1
- 5
0
votes
1 answer
Why is the CancelIo function failing?
I wrote the code below. I am calling this method to write to three different hard disks using three separate threads. One of the CancelIo calls is failing (returns false).
I assume that the disk is OK (the hardware is fine).
How can this be? …

Yanshof
- 9,659
- 21
- 95
- 195