>So a handle is a pointer to the Process-object that the OS creates
Not necessarily a pointer. You should at least not try to dereference
it.
What was the point of the processid then?
The process ID can easily be shared globally, you can pass it between
processes as a way to identify another process. The ID number is the
same regardless which process you're using it.
Process handles have access rights associated with them. You can for
example have one handle that allows you to change information about a
process, and another that only gives you right to query information.
Also, handle values are usually only useful within the process that
opened the handle. You can't pass a process handle from one
application to another and expect it to be valid at the recieving end.
Mattias
--
Mattias Sjögren [MVP] mattias @ mvps.org
http://www.msjogren.net/dotnet/ |
http://www.dotnetinterop.com
Please reply only to the newsgroup.