I checked the definition of MiniDumpWriteDump() method on MSDN as below:
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
);
Parameters:
hProcess [in]
A handle to the process for which the information is to be generated.
ProcessId [in]
The identifier of the process for which the information is to be generated.
Since either a process handle or a process ID can identify a process, why do we need to pass them both? Can't we infer one of them from the other? So there should be some differences between them, what are they?
Thanks.