Page 1 of 1
Some probs with RemoteExecute
Posted: Sat Apr 24, 2004 8:08 am
by meflin
Hi again,
now i'd like to use remoteexecute. i've a thread function, a correct window handle but nevertheless it dosn't work. what could be the reasons for it?
Posted: Sat Apr 24, 2004 10:58 am
by madshi
What window handle are you talking about? RemoteExecute has nothing to do with window handles. You need a *process* handle to get RemoteExecute working.
Posted: Sat Apr 24, 2004 3:59 pm
by meflin
good to know
after reading the manual i thought it would need a window handle *g* i'll trie it!
Posted: Sat Apr 24, 2004 4:16 pm
by madshi
How did the manual give you the idea that you need a window handle?
I mean the documentation about RemoteExecute doesn't even mention the word "window". And the first parameter is named "processHandle".
http://help.madshi.net/RemoteExecute.htm
Posted: Sat Apr 24, 2004 4:25 pm
by meflin
you are right it was my fault.
Posted: Thu May 06, 2004 5:04 pm
by meflin
ive tried several times now but finally im not able to get a processhandle. hows this possible???
Posted: Fri May 07, 2004 7:55 am
by madshi
About which process are you talking? How does your code look like?
Posted: Sat May 08, 2004 8:28 am
by meflin
Code: Select all
windowhandle := findwindow(nil,'Title');
GetWindowThreadProcesId(windowhandle,@pid);
but of course this isn't a processhandle but a processid... so ive tried with openprocess but failed anyway!
Posted: Sat May 08, 2004 8:37 am
by madshi
OpenProcess fails? How does your OpenProcess code look like? What does GetLastError say? About which process are we talking? Is it a normal application or a service or a system process?
Posted: Sat May 08, 2004 10:09 am
by meflin
ive managed it now
with a normal application. but is this also possible with system proceses?
Posted: Sat May 08, 2004 10:32 am
by madshi
Yes, as long as you have enough privileges.