Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: CMFC
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 15:09pm
moon_lu585
Comments
Sergey Alexandrovich Kryukov at 21-Jan-13 21:17pm
   
What cmd is supposed to mean?!! "but I want the App run the x64 cmd"... why? —SA
Bernhard Hiller at 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
0 OriginalGriff 382
1 Damith Weerasinghe 370
2 thatraja 350
3 Sergey Alexandrovich Kryukov 259
4 Ajith K Gatty 200
0 Sergey Alexandrovich Kryukov 10,639
1 OriginalGriff 6,658
2 Peter Leow 4,735
3 Abhinav S 3,813
4 Maciej Los 3,565


Advertise | Privacy | Mobile
Web02 | 2.8.140421.2 | Last Updated 21 Jan 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Use
Layout: fixed | fluid