OpenProcess + engine.exe?

10/06/2007 12:30 NegativeNrG#1
Hi,

when i use OpenProcess api, it doesn't open engine.exe? it always returns 0..
is there another way to open engine.exe process? like CE opens it correctly..

babel vista translation:
Hallo, wann verwende ich OpenProcess API, es nicht geöffnetes engine.exe? es bringt immer 0. zurück. gibt es eine andere Weise, engine.exe Prozeß zu öffnen? wie CER öffnet es richtig.
10/06/2007 21:58 ingam0r#2
Try something like this at the point where you call OpenProcess:

Quote:
HANDLE hProcess;
hProcess = OpenProcess(PROCESS_ALL_ACCESS, FALSE, pe32.th32ProcessID );
if( hProcess == NULL )
printError( "OpenProcess" );
else
{
// ... do something cool here. there was no error opening the process :D
}
I found this one at MSDN. Try it. It's a very useful resource with more documentation on the Win-API than you will ever need in your life. ([Only registered and activated users can see links. Click Here To Register...])

Some quick thoughts: Did you set the access rights right? Do you have a valid process ID to use with OpenProcess?

Oh... and btw. if you (hopefully) read your way through the MSDN be sure to follow their advises like
Quote:
When you are finished with the handle, be sure to close it using the CloseHandle function.
. They know what they are talking about. If you don't follow their advises this can lead to pain-in-the-ass debugging sessions or even an unstable system.

Have a nice evening
ingam0r
10/07/2007 02:13 NegativeNrG#3
Did i set the access rights right? if you mean by PROCESS_ALL_ACCESS, then yes, if for the
SeDebugPrivilege thing, no.

i double(well more than double) checked the PID of engine.exe...i also tried doing it on other processes and it returns the handle correctly, but for engine.exe, it never opens the process.
10/07/2007 13:38 ingam0r#4
Hmm... If you want you could post your code here. It's not easy to find errors without knowing the code. :)
10/07/2007 13:52 NegativeNrG#5
Hi,

i am using autoit to do this..very easy to understand ;)

#Include <Mem.au3>

$PID = = ProcessExists("engine.exe")
$Proc = _MemOpen($PID)
msgbox(0,"engine.exe PHANDLE:",)

i didn't put [code] tags because it will take the variables away :O
10/07/2007 14:38 syntex#6
autoit wont open the engine.exe
hackshield blocks autoit ... what you need autoit for...
when you learned autoit it shouldn't be hard to code the same macro ring 0 based on delphi c++ ...
search search for the procces and then open the window with the name 'KalOnline' ..
its easy , but wont work with autoit , autoit is craaaaaaaaaap :>

if you like add me on msn/icq.

atm I have no time to come online becouse of Work .. sorry :/
only once a week :/
10/08/2007 06:22 NegativeNrG#7
Hi,

wait..so your telling me hackshield blocks autoit? ok cool...at least i know i'm not doing something wrong :).
10/08/2007 11:14 R4Yx#8
learn delphi

windows.winexec('engine.exe /load /config debug',sw_normal);
10/08/2007 16:26 secret107#9
Quote:
Originally Posted by R4Yx View Post
learn delphi

windows.winexec('engine.exe /load /config debug',sw_normal);
But he want to Open the Process and not to create it.
10/08/2007 16:28 secret107#10
Quote:
Originally Posted by R4Yx View Post
learn delphi

windows.winexec('engine.exe /load /config debug',sw_normal);
But he want to Open the Process and not to create it.

Im interessted too in how to open the engine process. It must be possible in a other way then OpenProcess cause Revolution Engine can open it too.
10/08/2007 17:48 R4Yx#11
oh^^ sry :p