Fix mixing of TCHAR and WCHAR.