Click here to Skip to main content
15,881,281 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Now, In the X64 OS, I have an x86 Application which will run the some cmd. Default, the App run the x86 cmd , but I want the App run the x64 cmd.Is there any method for this , Thank you.
Posted
Comments
Sergey Alexandrovich Kryukov 21-Jan-13 21:17pm    
What cmd is supposed to mean?!!
"but I want the App run the x64 cmd"... why?
—SA
Bernhard Hiller 22-Jan-13 3:13am    
Do you want to start a 64bit application with e.g. System.Diagnostics.Process.Start(...) from a 32bit application?

1 solution

Please see my comment to the question.

Let's see. There is no such thing as X64 OS. As you mean "MFC", "OS" is probably Windows. There are versions for different CPU instruction-set architectures (http://en.wikipedia.org/wiki/Instruction_set[^]).

Usually, it is x86-64, Itanium (IE64) or x86. Only the last on is 32-bit, and it is compatible with all 64-bit architectures. On Windows, it is supported via WoW64. It's important to understand what it does:
http://en.wikipedia.org/wiki/WOW64[^].

Is it more or less clear now? All different architectures are incompatible by their instructions. You cannot combine executable modules compiled to target different instruction-set architecture in one process. That is, the same target instruction set should be use in one process. On both 64-bit architectures, 32-bit platform is emulated.

Your "x86" application means that it was compiled targeting x86 (32-bit) instruction set, nothing else. Hence, this code can run only under WoW64, as a 32-bit process. Nothing else.

—SA
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900