Click here to Skip to main content
12,076,925 members (47,424 online)
Rate this:
 
Please Sign up or sign in to vote.
See more: C MFC
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 21-Jan-13 16:09pm
moon_lu588
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

Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 1

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
  Permalink  

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

  Print Answers RSS
Top Experts
Last 24hrsThis month


Advertise | Privacy | Mobile
Web01 | 2.8.160212.1 | Last Updated 21 Jan 2013
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100