Quantcast
Channel: Visual Studio General Questions forum
Viewing all articles
Browse latest Browse all 21115

Why use TBYTE vs TCHAR?

$
0
0

I'm going through some legacy code for Unicode conversion and I've seen reference to a type called TBYTE.

TBYTE, like TCHAR is 1 byte for an ASCII build and 2 bytes for a Unicode build. The difference that I can see is that TCHAR is signed and TBYTE is unsigned. These are defined in winnt.h.

What I don't understand is why would anyone want to define a TBYTE since this isn't a byte, but varies based on if the application is Unicode or not.

Can anyone shed any light on this?


Adrian


Viewing all articles
Browse latest Browse all 21115

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>