Q: In your sample code sometimes you use TEXT, sometimes _T and sometimes L as a prefix to strings. What do these functions do and why the differences?
Windows CE uses Unicode strings and cannot accept ANSI strings to any function that uses a string. _T and TEXT are macros that convert ANSI strings to Unicode. If you look at the definitions of _T and TEXT you'll find this:
tchar.h #define _T(x) __TEXT(x)
winnt.h #define TEXT(quote) __TEXT(quote)
Meaning there are the same. In fact using the L macro also does the same, so all of these are equal:
It's just a matter of personal preference and style. You'll see all of them throughout ADS sample code depending largely on the developer who wrote it.