title: "Access is Denied" CreateFile() on Usb stick
body: <p>My goal is to read all bytes of an USB stick.</p>
  
  <p>I tryed to open "D:" with <code>CreateFile()</code> and <code>fopen()</code> but an ERROR is raised : </p>
  
  <blockquote>
    <p>"Access is Denied"</p>
  </blockquote>
  
  <pre class="lang-cpp prettyprint-override"><code>HANDLE disk = CreateFile("D:", 
                           GENERIC_READ,
                           FILE_SHARE_READ,        
                           NULL,
                           OPEN_EXISTING,
                           FILE_ATTRIBUTE_NORMAL,
                           NULL);
  
      if (disk == INVALID_HANDLE_VALUE) {
          printf ("%d\n", GetLastError());
          return -1;
      }
  </code></pre>
  
  <p>This code prints 5 (="Access is Denied").</p>
  
  <p>I'm using Windows 8 and C++.</p>
  
  <p>Can someone explain to me why an error is raised ?</p>