title: GetTempFileName appears to be broken on Windows 10
body: <p>I have an MFC program that uses <code>GetTempFileName</code>.  On Windows 7 it works correctly, however when I take the same code to Windows 10 it produces garbage.</p>
  
  <pre><code>TCHAR temp_dir[1024];
  GetTempPath(1024,temp_dir);
  TCHAR temp_file[1024];
  GetTempFileName("C:\\","udb",0,temp_file);
  std::cout &lt;&lt; "Temp DB Path: " &lt;&lt; temp_file &lt;&lt; std::endl;
  </code></pre>
  
  <p>On Windows7:</p>
  
  <pre><code>Temp DB Path: C:\udb2145.tmp
  </code></pre>
  
  <p>On Windows10:</p>
  
  <pre><code>Temp DB Path: o▒
  </code></pre>
  
  <p>Am I doing something wrong in my code?  Or is there a different function I should be using?</p>