开发者

windows: if ReadFile fails, can I ReadFile again?

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜