title: Create directory under local app data
body: <p>I have application written in C/C++ and it needs to create a folder and file under the local app directory.  When I call CreateDirectory the result is False and the directory is never created.  What am I missing?</p>
  
  <pre><code>TCHAR szPath[MAX_PATH];
  if (SUCCEEDED(SHGetFolderPath(NULL,CSIDL_LOCAL_APPDATA|CSIDL_FLAG_CREATE, NULL, 0, szPath)))
  {
      PathAppend(szPath,_T("\\FredDir\\backupfirmware\\"));
      bool result = CreateDirectory(szPath, NULL);
  }
  </code></pre>
  
  <p>As near as I can tell this should work.</p>