How to run a 32-bit program on a 64-bit Machine

Source: Internet
Author: User

First introduce the Platform
Windows Server 2008
Network Service: IIS 7.0

You need to call the previously encapsulated C ++ DLL in the web program

To do well, you must first sharpen your tools.
Because there is no vs2008 that can be installed on a 64-bit machine,
Therefore, vs2010 is installed, which can be safely used due to backward compatibility.

There are two ideas:
One is to compile both web programs and C ++ DLL into 64-bit
The other is compiled into 32-bit
I have tried both methods. Since I have never touched C ++, the first method involves
To modify the C ++ code and other work, you can't get through, so you give up and use the second method.
Why can I call a 32-bit DLL on a 64-bit machine?

Http://baike.baidu.com/view/3403344.html? Fromtaglist
Http://www.cnblogs.com/awpatp/archive/2010/02/03/1662767.html
Http://kb.cnblogs.com/a/1662767/
Http://s.yanghao.org/program/viewdetail.php? I = 50570.

The first step is to compile the web program. Make sure to select x86 as the target machine.
Instead of any CPU. Any CPU will be selected based on your operating system
Whether it is 64-bit or 32-bit.

The second step is to build the C ++ source code on your hand. Previously compiled
The DLL under Win32 cannot be used at this time, and "the parallel configuration of the application is incorrect" may occur"
. Therefore, you need to recompile it into a DLL.
There is an error in opening the C ++ source code on a 64-bit machine. I re-compile on the local machine.

Step 3 entrypoint name may change. When "entry point not found" is reported"
When an error occurs, you need to open the DLL in dependends to check whether the names of each entry point match

Step 4 solves the problems caused by debugging. I use try catch to catch errors.
"Thread was being aborted error", the solution is to remove try catch.
See: http://archive.cnblogs.com/a/1963748/

Step 5: run the program OK directly in Vs, but an error "Unrecognized attribute targetframework" is reported after the program is released.
Solution: see http://www.cnblogs.com/luzx/archive/2010/04/29/1723677.html

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.