2011. 5. 25.

Kill process by c++ at XP

Many program examples have  a non-proper parameter in privaliage parameters

I replaced parameter. //   PROCESS_ALL_ACCESS -->PROCESS_TERMINATE
// Although you have done, some processes don't be killed.

hProcess = OpenProcess(PROCESS_ALL_ACCESS, FALSE, pe32.th32ProcessID);

//when process_all_access is used,  functions returns error ( access denied)
hProcess = OpenProcess(PROCESS_TERMINATE, FALSE, pe32.th32ProcessID);

댓글 없음:

댓글 쓰기