title: specific line of code exiting with code 255 after changing code generation
body: <p>Well I tried to compile a small testing app I am working on.</p>
  
  <p>So to keep things short and simple:</p>
  
  <p>When I set my code generation from "Multi Threaded DLL" to "Multi Threaded" to get rid of some dependencies, the following line of code crashes my application (where it usually runs without any flaws)</p>
  
  <p>The crash happens when I want to convert a short path to a long path. as such:</p>
  
  <pre><code>LPCSTR tmp = reinterpret_cast&lt;LPCSTR&gt;(getenv("Temp"));
  GetLongPathNameA(tmp,tempFolder,MAX_PATH);
  </code></pre>
  
  <p>The crash specifically occurs at the first line:</p>
  
  <pre><code>LPCSTR tmp = reinterpret_cast&lt;LPCSTR&gt;(getenv("Temp"));
  </code></pre>
  
  <p>So any ideas here why it suddenly stops working when you switch the code generation mode? Thanks!</p>
  
  <p>EDIT:</p>
  
  <p>After some code-rewriting I managed to find out it specifically crashes when executing</p>
  
  <pre><code>getenv("Temp");
  </code></pre>
  
  <p>very very weird seeing as it does work in the other mode</p>