title: CreateFile() return an invalid pointer with the address FFFFFF
body: <p>I just want to read a file using the function CreateFile such as following :</p>
  <pre><code>#include &lt;iostream&gt;
  #include &lt;windows.h&gt;
  #include &lt;stdio.h&gt;
  int main(int argc, char **argv)
  {
      PIMAGE_DOS_HEADER pImageDosHeader;
      HANDLE hFile = NULL;
      HANDLE hMapObject;
      PUCHAR uFileMap;
      if (argc &lt; 2)
          return (-1);
      std::cout &lt;&lt; &quot;hFile=&quot; &lt;&lt; hFile &lt;&lt; std::endl;
      if (!(hFile = CreateFile((LPCWSTR)argv[1], GENERIC_READ | GENERIC_WRITE, FILE_SHARE_READ,
          NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL)))
      {
          return (-1);
      } else {
          std::cout &lt;&lt; argv[1] &lt;&lt; std::endl;
          std::cout &lt;&lt; &quot;hFile=&quot; &lt;&lt; hFile &lt;&lt; std::endl;
          getchar();
      }
      return (0);
  }
  </code></pre>
  <p>The problem is that the output is like below :</p>
  <blockquote>
  <p>hFile=000000 (the pointer is initialized to NULL -&gt; OK)</p>
  <p>hFile=FFFFFF (invalid pointer)</p>
  </blockquote>
  <p>Does anyone can help me, please ?
  Thanks in advance for your help.</p>