I only know the HWND as an input, first I use GetWindowThreadProcessId to get the process ID. But then how can I convert the process ID as the first input parameter of TerminateProcess which is HANDLE?
Thanks in advance!Code:DWORD dwProcessID = 0; ::GetWindowThreadProcessId(hWndGot, &dwProcessID);




Reply With Quote