What is the difference between a LPTSTR and a LPWSTR???
How can I convert between the two?
Printable View
What is the difference between a LPTSTR and a LPWSTR???
How can I convert between the two?
I think LPWSTR is a unicode data type...
LPTSTR -- An LPWSTR ifUNICODE is defined, an LPSTR otherwise.
LPWSTR -- Pointer to a null-terminated string of 16-bit Unicode characters. For more information, seeCharacter Sets Used By Fonts.
Is it just me or does anyone else find this confusing?
I find the second method much more readable, because it shows the indirection levels :confused:Code:LPTSTR szString = TEXT("String");
// as opposed to this
TCHAR *szString = TEXT("String");