Hi,
I have some .NET 2.0 code that's been built targeting "Any CPU". On an
x64 box I need to force this to run in x86 mode under WOW64 *without*
recompiling the application . (i.e. as if the code had been compiled
targeting x86.)
Is this possible - if so, how?
(Apologies if this is not the correct group - feel free to direct me
somewhere else)
Many thanks,
Matt
ktrvnbq02@sneakemail.com - 01 Oct 2007 10:45 GMT
On Oct 1, 10:38 am, ktrvnb...@sneakemail.com wrote:
> I have some .NET 2.0 code that's been built targeting "Any CPU". On an
> x64 box I need to force this to run in x86 mode under WOW64 *without*
> recompiling the application . (i.e. as if the code had been compiled
> targeting x86.)
>
> Is this possible - if so, how?
Incidentally I know I could do this by launching the code from a 32-
bit process (e.g. launching from 32-bit command prompt), but if
possible I'd like to force this with something like a manifest or an
alteration to the header etc.
Regards,
Matt
ktrvnbq02@sneakemail.com - 01 Oct 2007 11:54 GMT
On Oct 1, 10:38 am, ktrvnb...@sneakemail.com wrote:
> I have some .NET 2.0 code that's been built targeting "Any CPU". On an
> x64 box I need to force this to run in x86 mode under WOW64 *without*
> recompiling the application . (i.e. as if the code had been compiled
> targeting x86.)
Found a solution using corflags.exe in the SDK to modify the PE
header:
http://blogs.msdn.com/gauravseth/archive/2006/03/07/545104.aspx
e.g. corflags myapp.exe /32BIT+
Which is OK if the assembly is not strong named. I would be interested
to know if the same would be possible via a manifest file.
Regards,
Matt