I am using the Windows ReadFile function to read a large file.
If the network is not so stable, at times I will get an error when calling ReadFile (network location no longer available). At the moment, if this happens I just error out and terminate my process.
What if, when ReadFile fails, I just wait a few seconds and try again? 开发者_C百科 Assuming the network issue went away, would I get the right data from ReadFile? Or at that point does it forget where in the file it tries to read?
If ReadFile
failed because the network share went away, you most likely will have to reopen the file when it comes back.
精彩评论