title: What share mode is used when files are opened using open()
body: <p>I can see nothing in the <code>open()</code> function's parameters that allows specification of how the file will be shared. I suspect therefore that the file will be shared as permissively as possible. Specifically:</p>
  
  <ol>
  <li>When the file is opened for reading, its sharing mode will allow subsequent open operations to open the file for reading, but not for writing.</li>
  <li>When the file is opened for writing, its sharing mode will deny subsequent open operations to open the file for reading or writing.</li>
  </ol>
  
  <p>That would seem to me to be the most logical implementation. Are my assumptions correct?</p>
  
  <p><strong>Update:</strong> Martijn Pieters states that the answer is OS dependent. So, for the sake of this question, my target OS is Windows.</p>