Based on what you’ve read in this chapter, the first part of this section summarizes what you should always keep in mind when developing your code. The second part of the section provides tips and tricks for better Unicode and ANSI string manipulations. It’s a good idea to start converting your application to be Unicode-ready even if you don’t plan to use Unicode right away. Here are the basic guidelines you should follow:
Start thinking of text strings as arrays of characters, not as arrays of
chars or arrays of bytes.
Use generic data types (such as
TCHAR/PTSTR) for text characters and strings.
Use explicit data types (such as
PBYTE) for bytes, byte pointers, and data buffers.
Use the ...