Precautions for porting to x64 (including amd64 and em64t)

Source: Internet
Author: User
Win64 adopts the llp64 data mode, that is, the data type, such as int and long, is still 32-bit, and the address is 64-bit. In this way, code porting is less work. Generally, you can use the same code to generate a 32-bit or 64-bit program. Note that some data types, such as lparam, often use this parameter to pass the address, so this type is processed by pointer, that is, it is 64-bit. If you often write the following function segments:

Sendmessage (..., (long) lptext );

In 32-Bit mode, no problem occurs. In 64-Bit mode, an error occurs. Therefore, it is best to add the/wp64 option during compilation. This will give you some warnings to help you find errors in the program.

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.