Re: _T() return LPCTSTR?



"Joseph M. Newcomer" <newcomer@xxxxxxxxxxxx> wrote in message news:ma7hs11a2079cener01fb9up07vsl5qc8h@xxxxxxxxxx

The _T() doesn't matter.

I am shocked. Not only do I think you surely know better, but you posted 10 hours after David Webber posted a correct answer.


In VS6, the type of a quoted string was LPSTR or LPWSTR.

The type of a quoted string was LPSTR. The type of _T(of a quoted string) was LPSTR or LPWSTR, depending on the compilation environment. In each case the type of _T(of q auoted string) was LPTSTR.


This was actually a bug.

If you wish to accuse dmr (or maybe one of his colleagues) of committing a design bug by allowing quoted strings to be writeable, you certainly hold more than enough qualifications to do so. But in this case Microsoft's implementation wasn't a bug.


In VS7, the type of a quoted string is LPCSTR or LPCWSTR.

The type of a quoted string was LPCSTR. The type of _T(of a quoted string) was LPCSTR or LPCWSTR, depending on the compilation environment. In each case the type of _T(of a quoted string) was LPCTSTR.


_T() generates either an 8-bit character string or a Unicode character string

Either a multibyte character string or a Unicode character string. In this context MSDN and I think the ISO standard define multibyte to include 8-bit character strings (i.e. multi can be 1 though of course it isn't always).


.