Some more notes. Replacing Delay(1, NULL); with SystemTask(); does not help. I though perhaps it would, but for large files, there are still many timeouts.
To further illustrate the bizarreness, compare these two psudeocode blocks, noting that the first block (the one that checks gIOComplete...