Quote Originally Posted by deville75 View Post
I believe I need to typecast a lot of these variables before sending them into the functions. Anyone know how to typecase TCHAR [255] to const char*?
TCHAR is a type that is defined based on whether UNICODE is defined or not. If defined, TCHAR will be wchar_t else char. The fact of the matter is that the strlen, stricmp functions work on chars. You might need to use wcslen,wcsicmp and the likes. I believe there are some functions like _tcslen as well.

Converting between wchar_t and char is done using wcstombs and mbstowcs (mbs being multi-byte string and wcs being wide-char string).

On the whole I'd say you should convert everything to a QString asap. QString will understand TCHAR based on the fact that it understands both wchar_t and char and saves you of this MSy TCHAR hassle.

If you want to stick to the TCHAR thing, start reading here.