Quantcast
Channel: Windows 7 Miscellaneous forum
Viewing all articles
Browse latest Browse all 11372

WriteFile API is not able to detect the errors caused by network outage?

$
0
0

WriteFile is not able to detect the errors caused by network outage?

Below is the environment:

  1. No flag is set in the parameter dwFlagsAndAttributes for CreateFile API. Using default system cache.
  2. We write buffer to file in a remote share.WriteFile system API does not give any error when client network is down.
  3. When the network is up,  FlushFileBuffers API says success. But there is no data written to the file in remote share.

WriteFile API will detect the network error if first time buffer is written to the remote share file handle. Successive WriteFile will not detect the network failure.  Is this because of cache in the local PC? Even if the data is written to cache, why flush does not guarantee the data written to file? 


Viewing all articles
Browse latest Browse all 11372

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>