Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / New Users / October 2007

Tip: Looking for answers? Try searching our database.

.NET code compiled as Any CPU. Want to run as 32-bit on x64.

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
ktrvnbq02@sneakemail.com - 01 Oct 2007 10:38 GMT
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

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.