A process identifier is a number that uniquely identifies a process. A process handler is also a number that uniquely identifies a process core object.
Why do we need them, since any of them can identify the process.
I think the answer may lie in the ratio of the mapping between the process and the process core object. Is it true that more than one process core object can be mapped to a single process? And each process core object has its own process descriptor. So each of the process core objects can be a different access mode or something like that.
This question came to me when I use the MiniDumpWriteDump () function , which is declared as follows:
BOOL WINAPI MiniDumpWriteDump(
__in HANDLE hProcess,
__in DWORD ProcessId,
__in HANDLE hFile,
__in MINIDUMP_TYPE DumpType,
__in PMINIDUMP_EXCEPTION_INFORMATION ExceptionParam,
__in PMINIDUMP_USER_STREAM_INFORMATION UserStreamParam,
__in PMINIDUMP_CALLBACK_INFORMATION CallbackParam
);
Thus, the parameters include both the process identifier and the process descriptor. I just don’t know why they need it.
Thanks so much for your ideas.
source
share