Windows Internals Notes--character and string processing

Source: Internet
Author: User

1. Since Windows NT, all versions of Windows are built entirely in Unicode, and when invoking a Windows function, if an ANSI string is passed to it, the function first converts the string to Unicode and then passes the result to the operating system. If you want the function to return an ANSI string, the operating system will first convert the Unicode string to an ANSI string and return the result to our application. Therefore, the system generates time and memory overhead.

2. All COM interface methods that require strings as arguments accept only Unicode strings.

3. By default, when you create a new C + + project in VS, _unicode is already defined (as if UNICODE was already defined). For identifiers that are not part of the C + + standard library, the C Runtime library always appends an underscore prefix to them. However, the Windows team did not, so in the application, you should make sure that either UNICODE and _UNICODE are defined at the same time, or none of them are defined.

Windows Internals Notes--character and string processing

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.