flat assembler
Message board for the users of flat assembler.

Index > Windows > Important Win64 question

Author
Thread Post new topic Reply to topic
snify



Joined: 02 Dec 2004
Posts: 39
snify 13 Jan 2006, 09:11
I want to execute 64bit code from PE32 running on Win64 and 64bit cpu.
I'm trying to make PE32 which checks the os version and then runs 32bit or 64bit code, but PE32+ is invalid format for Win32.. So I'm trying to run 64bit code on 32bit process. Is there any way with threading or something? Shocked
Post 13 Jan 2006, 09:11
View user's profile Send private message Visit poster's website Reply with quote
r22



Joined: 27 Dec 2004
Posts: 805
r22 13 Jan 2006, 22:21
The simplest way would be to pack the 64bit version inside the 32bit version of the exe and IF the computer can handle 64bit, do a
createfile and write the 64bit version then createprocess or shell exec.

I'm not sure if the 32bit createprocess api will load a 64bit PE but I think this method would work.
Post 13 Jan 2006, 22:21
View user's profile Send private message AIM Address Yahoo Messenger Reply with quote
snify



Joined: 02 Dec 2004
Posts: 39
snify 14 Jan 2006, 00:12
I need other way without creating exe and executing it.. please help
Post 14 Jan 2006, 00:12
View user's profile Send private message Visit poster's website Reply with quote
SFeLi



Joined: 03 Nov 2004
Posts: 138
SFeLi 14 Jan 2006, 07:41
There is no other way. "Application must consist of either 32-bit or 64-bit code — it can't have both". But r22's solution will work.

More information
Post 14 Jan 2006, 07:41
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2023, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.