title: wcstombs_s is not working properly
body: <p>I am using <code>wcstombs_s</code> in my code to convert <code>CString</code> to <code>char*</code>. here is code:</p>
  
  <pre><code>  AddItemToListIncludeSubFolder(CString FolderPath, CString Parent)
    {
      char szInputPath[1024]; 
  
      memset(szInputPath,1024,'\0');
      size_t CharactersConverted=0;
  
      wcstombs_s(&amp;CharactersConverted, szInputPath, FolderPath.GetLength()+1, 
          FolderPath, _TRUNCATE);
    }
  </code></pre>
  
  <p>It raises exception some time. Memory exception. is <code>wcstombs_s</code> is not working when <code>CString</code> is too long like 1024 character or I am doing something wrong.</p>