title: why do I get errno EINVAL (innvalid parameters) but only when the file is empty
body: <p>I use <code><a href="http://msdn.microsoft.com/en-us/library/8f30b0db%28VS.71%29.aspx" rel="nofollow noreferrer">_fsopen</a>(path, "r+", _SH_DENYRW)</code> for opening a file in C any parameter for protection (_SH_...) cause the same issue.</p>
  
  <p>When opening an empty file, <code>errno</code> is set to 22 (<code>EINVAL</code>), not so when the file isn't empty - then all is OK. What can I do?</p>