The OS in Win 2003 Server Service Pack 1.
calling "TerminateProcess(ProcessID, 15000)"
returns in Get LAst error:
The handle is invalid!.
We know the ProcessID is correct.
We are quite lost.
What can we do
Kind Regards,
Robert.
> The handle is invalid!.
>
> We know the ProcessID is correct.
Sometimes people confuse process ID with window handles.
How are you getting ProcessID?
--
- Mike
But read the message again. Maybe the ID is correct, but what about the
*handle*?
--
Rob
Thanks,
Robert.
"Mike Warren" <miwa-not...@or-this-csas.net.au> wrote in message
news:xn0fs78r...@newsgroups.borland.com...
> calling "TerminateProcess(ProcessID, 15000)"
>
> returns in Get LAst error:
>
> The handle is invalid!.
As it should. Please read the documentation. TerminateProcess() requires a
handle to the process, not the process ID. You have to use OpenProcess() to
retreive the handle for a given ID (unless you spawned the process yourself
in code, in which case use the handle that CreateProcess() returns).
Gambit