C++ - How do you convert from String to TCHAR*?
<p>Here's my code:</p>

<pre><code>string str = "Hello!";
TCHAR* tch = new TCHAR[str.length() + 1];
mbstowcs_s(NULL, tch, _tcslen(tch), str.c_str(), str.length());
// Use tch for other stuff...
delete [] tch; // Gives debug heap corruption assertion
</code></pre>

<p>For some reason I'm getting a heap corruption assertion with this code.  I'm racking my brain trying to figure what could be wrong.  I can't find any good documentation for the similarities and differences between strings and tchars which would help me figure this out on my own.</p>
