Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.

  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 6. Windows Threading > Wide String Handling in Windows

Wide String Handling in Windows

Before we discuss the handling of multiple processes in Windows, it is necessary to have a short discussion of the handling of strings.

Since Windows NT 4, Windows has used Unicode as its default text encoding format. Unicode defines support for greater than 8-bit encoding of characters. Windows uses UTF-16 format, known as wide character encoding, which uses two bytes per character. Many Windows functions are defined with two entry points: a Unicode version that has a W appended, for wide character, or an ANSI character entry point that is appended with an A. For example, the CreateMutex() function call has a supporting CreateMutexW() and a CreateMutexA(). At compile time, the appropriate function call will be made depending on whether UNICODE is defined. Since Windows uses wide characters internally, the ANSI entry points are just wrappers around the wide versions of the function calls with appropriate string conversion.


  

You are currently reading a PREVIEW of this book.

                                                                                                                    

Get instant access to over $1 million worth of books and videos.

  

Start a Free Trial


  
  • Safari Books Online
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint