Re: How to LPCTSTR Convert to char *
- From: r norman <r_s_norman@xxxxxxxxxxxx>
- Date: Wed, 06 Dec 2006 14:01:00 -0500
On Wed, 06 Dec 2006 13:12:20 -0500, Joseph M. Newcomer
<newcomer@xxxxxxxxxxxx> wrote:
An LPCTSTR is a const TCHAR *, so do you mean you want to remove the const attribute, or
you really want a 'char *' data type (remember that char and char* represent an obsolete
technology that should be used only in very rare and exotic situations where you are
absolutely guarnteed because of external specs to be using 8-bit characters, and should
never be coded as a matter of course in any program).
If you really want a 'char *', that is, a pointer to an 8-bit character string, then you
have to explain why you need it and how you plan to handle the down-conversion from
Unicode characters that have no 8-bit equivalents.
There are those of us who must interface with external hardware in
which the communication interface specifies ASCII character set
messages. For us, creating char[] messages and filling specific
fields with char strings is quite essential. I was enormously taken
aback by switching to the latest Visual Studio and finding all my
strings defaulting to Unicode. So far my applications do not need
internationalization and I am working hard to separate strings used
for user interface from strings used for device communications, though
they are closely inter-related. Still, legacy code including pieces
dating back to DOS days, makes for hard work which is hard to get
somebody to pay for since it does not produce visible enhancements to
performance or add features.
.
- Follow-Ups:
- Re: How to LPCTSTR Convert to char *
- From: Joseph M . Newcomer
- Re: How to LPCTSTR Convert to char *
- From: Tom Serface
- Re: How to LPCTSTR Convert to char *
- From: Ajay Kalra
- Re: How to LPCTSTR Convert to char *
- References:
- How to LPCTSTR Convert to char *
- From: rxgmoral
- Re: How to LPCTSTR Convert to char *
- From: Joseph M . Newcomer
- How to LPCTSTR Convert to char *
- Prev by Date: Re: Using an MFC DLL in VB.NET
- Next by Date: Re: How to LPCTSTR Convert to char *
- Previous by thread: Re: How to LPCTSTR Convert to char *
- Next by thread: Re: How to LPCTSTR Convert to char *
- Index(es):
Relevant Pages
|
Loading