Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / Managed C++ / May 2005

Tip: Looking for answers? Try searching our database.

why is TCHAR defined as wchar_t

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
SteveK - 12 May 2005 22:40 GMT
I cannot for the life of me figure out how to TCHAR to be defined as an
unsigned char as it is in out 6.0 project.

I created a fresh VS 2003 project and played around with the settings and
still cannot get TCHAR to be defined as anything other than wchar_t

Here are the compiler options in my setting's command window:

/Od /D "WIN32" /D "_WINDOWS" /D "_DEBUG" /D "_MBCS" /D "_AFXDLL" /Gm /EHsc
/RTC1 /MDd /J /GR /Fo"Debug/" /Fd"Debug/vc70.pdb" /FR"Debug/" /W4 /nologo /c
/Wp64 /ZI /TP

one of them must be causing TCHAR to be set to wchar_t

Does anyone know what it doing it?

Thank you very much.

#ifndef _TCHAR_DEFINED
typedef char TCHAR, *PTCHAR;                // line 324 of WinNT.h
typedef unsigned char TBYTE , *PTBYTE ;
#define _TCHAR_DEFINED
#endif /* !_TCHAR_DEFINED */
Charles F McDevitt - 13 May 2005 00:19 GMT
>I cannot for the life of me figure out how to TCHAR to be defined as an
>unsigned char as it is in out 6.0 project.
[quoted text clipped - 19 lines]
> #define _TCHAR_DEFINED
> #endif /* !_TCHAR_DEFINED */

None of those options are causing TCHAR to be wchar_t.

Somewhere you've managed get something included that #defines UNICODE or
_UNICODE,
which says to set TCHAR to be wchar_t.
thatsalok - 14 May 2005 08:21 GMT
TCHAR is Defined in WinNt.h as
#ifdef UNICODE
#define TCHAR wchar_T
#else
#deifne TCHAR char
#endif

Check wheather your Project configuration is UNICOdE enabled by
mistake.

> *I cannot for the life of me figure out how to TCHAR to be defined as
> an
[quoted text clipped - 23 lines]
> #define _TCHAR_DEFINED
> #endif /* !_TCHAR_DEFINED */ *



Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.