title: How to get Current Directory?
body: <p>I want to create a file in the current directory (where the executable is running).</p>
  <p>My code:</p>
  <pre><code>LPTSTR NPath = NULL;
  DWORD a = GetCurrentDirectory(MAX_PATH,NPath);
  HANDLE hNewFile = CreateFile(NPath,GENERIC_WRITE,0,NULL,CREATE_ALWAYS,FILE_ATTRIBUTE_NORMAL,NULL);
  </code></pre>
  <p>I get exception at <code>GetCurrentDirectory()</code>.</p>
  <p>Why am I getting an exception?</p>