RichieHindle correctly explains that there are two variants of most API's, a *W (Unicode) and a *A (ANSI) variant. But after that he's slightly wrong.
It's important to know that the *A variants (such as MessageBoxA
) are just wrappers for the *W versions (such as MessageBoxW
). They take the input strings and convert them to Unicode; they take the output strings and convert them back.
In the Windows SDK, for all such A/W pairs, there is a #ifdef UNICODE
block such that MessageBox()
is a macro that expands to either MessageBoxA()
or MessageBoxW()
. Because all macros use the same condition, many programs use either 100% *A functions or 100% *W functions. "non-Unicode" applications are then those that have not defined UNICODE
, and therefore use the *A variants exclusively.
However, there is no reason why you can't mix-and-match *A and *W functions. Would programs that mix *A and *W functions be considered "Unicode", "non-Unicode" or even something else? Actually, the answer is also mixed. When it comes to that Clock, Language, and Region setting, an application is considered a Unicode application when it's making a *W call, and a non-Unicode application when it's making a *A call - the setting controls how the *A wrappers translate to *W calls. And in multi-threaded programs, you can therefore be both at the same time (!)
So, to come back to RichieHindle's example, if you call a *A function with value (char)0xE4
, the wrapper will forward to the *W function with either L'ä'
or L'ה'
depending on this setting. If you then call the *W function directly with the value (WCHAR)0x00E4
, no translation happens.