Posted: Tue Jun 15, 2010 8:11 am Post subject: GetModuleBaseName fails on 64-bit processes
I want to print all processes on a list view but when I call GetModuleBaseName from a 32-bit app it fails to get the base name of 64-bit processes. I know EnumProcesses finds all processes because it reports that 66 processes have been found but there are only about 20 processes that are printed on the list view and all those are 32-bit processes. Anyone know how to make it work on 64-bit processes as well?
Do CreateToolhelp32Snapshot with 64-bit processes? I mean if you look at the name of the functions one would think that it just works with 32-bit processes.
And how do I compile it as 64-bit? I'm using VC++ 2010 Express.
Joined: 09 May 2003 Posts: 25783 Location: The netherlands
Posted: Wed Jun 16, 2010 5:52 am Post subject:
yes, CreateToolhelp32Snapshot works fine in 32-bit apps to get 64-bit processes and modules
------
as for porting to 64-bit(You don't have to, unless you also want to read/write the process memory): Make sure you have the 64-bit build stuff installed, then in the configuration manager create a new platform and select x64
and then spend some time porting the rest of your code to 64-bit as well (e.g ptruint instead of dword's etc...) _________________
Do not ask me about online cheats. I don't know any and wont help finding them.
Like my help? Join me on Patreon so i can keep helping
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