Quote Originally Posted by Lindley View Post
Odds are, you have a char array somewhere which you're trying to pass to a function which now wants a wchar_t array (or TCHAR). Normally the compiler would yell at you for this, but if you made the mistake of casting away the problem, it could have come back to bite you.

Unfortunately once you overwrite memory that doesn't belong to you, it's impossible to predict when the program will fail after that, so the problem isn't necessarily where the debugger thinks it is.
I wish that were the case. Whoever wrote this program uses "_tstring" eveywhere which when looking at the string header file yields:

Code:
#ifdef _UNICODE
typedef wstring _tstring; 
#else
typedef string _tstring;
#endif