[?] Retrieving a process handle - Printable Version -Shoutbox (https://shoutbox.menthix.net) +-- Forum: MsgHelp Archive (/forumdisplay.php?fid=58) +--- Forum: Messenger Plus! for Live Messenger (/forumdisplay.php?fid=4) +---- Forum: Scripting (/forumdisplay.php?fid=39) +----- Thread: [?] Retrieving a process handle (/showthread.php?tid=89321) [?] Retrieving a process handle by SmokingCookie on 02-21-2009 at 06:11 PM
Hi, RE: [?] Retrieving a process handle by matty on 02-21-2009 at 06:56 PM What handle are you trying to retrieve? RE: [?] Retrieving a process handle by SmokingCookie on 02-21-2009 at 06:59 PM The hProcess parameter to pass to WriteProcessMemory. RE: [?] Retrieving a process handle by matty on 02-22-2009 at 03:53 PM But are you trying to write to the Messenger process? If so GetCurrentProcess will work. RE: [?] Retrieving a process handle by SmokingCookie on 02-22-2009 at 05:14 PM
As I said in the first post, I'm not trying to retrieve the Messenger process handle. RE: [?] Retrieving a process handle by Mnjul on 02-22-2009 at 05:31 PM
If you know the window handle, then GetWindowThreadProcessId (returning a process id) and OpenProcess (returning a process handle from process id) should help. RE: [?] Retrieving a process handle by SmokingCookie on 02-23-2009 at 09:16 AM Well, it appears to work, except for the writing part. Access denied RE: [?] Retrieving a process handle by -dt- on 02-23-2009 at 10:41 AM
quote:er, is your process higher than the one you're writing to? with winamp i do GetWindowThreadProcessId then OpenProcess with the PROCESS_ALL_ACCESS flag then you should be able to call VirtualAllocEx (if you want to allocate memory within its space) then WriteProcessMemory RE: [?] Retrieving a process handle by SmokingCookie on 02-23-2009 at 03:33 PM
|