Process Hacker
termator.c File Reference
#include <phapp.h>
#include <kphuser.h>

Go to the source code of this file.

Macros

#define CROSS_INDEX   0
 
#define TICK_INDEX   1
 

Typedefs

typedef NTSTATUS(NTAPI * _NtGetNextProcess )(_In_ HANDLE ProcessHandle, _In_ ACCESS_MASK DesiredAccess, _In_ ULONG HandleAttributes, _In_ ULONG Flags, _Out_ PHANDLE NewProcessHandle)
 
typedef NTSTATUS(NTAPI * _NtGetNextThread )(_In_ HANDLE ProcessHandle, _In_ HANDLE ThreadHandle, _In_ ACCESS_MASK DesiredAccess, _In_ ULONG HandleAttributes, _In_ ULONG Flags, _Out_ PHANDLE NewThreadHandle)
 
typedef NTSTATUS(NTAPI * PTEST_PROC )(_In_ HANDLE ProcessId)
 
typedef struct _TEST_ITEM TEST_ITEM
 
typedef struct _TEST_ITEM * PTEST_ITEM
 

Functions

INT_PTR CALLBACK PhpProcessTerminatorDlgProc (_In_ HWND hwndDlg, _In_ UINT uMsg, _In_ WPARAM wParam, _In_ LPARAM lParam)
 
VOID PhShowProcessTerminatorDialog (_In_ HWND ParentWindowHandle, _In_ PPH_PROCESS_ITEM ProcessItem)
 

Variables

TEST_ITEM PhTerminatorTests []
 

Macro Definition Documentation

#define CROSS_INDEX   0

Definition at line 43 of file termator.c.

#define TICK_INDEX   1

Definition at line 44 of file termator.c.

Typedef Documentation

typedef NTSTATUS(NTAPI * _NtGetNextProcess)(_In_ HANDLE ProcessHandle, _In_ ACCESS_MASK DesiredAccess, _In_ ULONG HandleAttributes, _In_ ULONG Flags, _Out_ PHANDLE NewProcessHandle)

Definition at line 26 of file termator.c.

typedef NTSTATUS(NTAPI * _NtGetNextThread)(_In_ HANDLE ProcessHandle, _In_ HANDLE ThreadHandle, _In_ ACCESS_MASK DesiredAccess, _In_ ULONG HandleAttributes, _In_ ULONG Flags, _Out_ PHANDLE NewThreadHandle)

Definition at line 34 of file termator.c.

typedef struct _TEST_ITEM * PTEST_ITEM
typedef NTSTATUS(NTAPI * PTEST_PROC)(_In_ HANDLE ProcessId)

Definition at line 46 of file termator.c.

typedef struct _TEST_ITEM TEST_ITEM

Function Documentation

static INT_PTR CALLBACK PhpProcessTerminatorDlgProc ( _In_ HWND  hwndDlg,
_In_ UINT  uMsg,
_In_ WPARAM  wParam,
_In_ LPARAM  lParam 
)

Definition at line 865 of file termator.c.

VOID PhShowProcessTerminatorDialog ( _In_ HWND  ParentWindowHandle,
_In_ PPH_PROCESS_ITEM  ProcessItem 
)

Definition at line 64 of file termator.c.

Variable Documentation

TEST_ITEM PhTerminatorTests[]
Initial value:
=
{
{ L"TP1", L"Terminates the process using NtTerminateProcess", TerminatorTP1 },
{ L"TP2", L"Creates a remote thread in the process which terminates the process", TerminatorTP2 },
{ L"TT1", L"Terminates the process' threads", TerminatorTT1 },
{ L"TT2", L"Modifies the process' threads with contexts which terminate the process", TerminatorTT2 },
{ L"TP1a", L"Terminates the process using NtTerminateProcess (alternative method)", TerminatorTP1a },
{ L"TT1a", L"Terminates the process' threads (alternative method)", TerminatorTT1a },
{ L"CH1", L"Closes the process' handles", TerminatorCH1 },
{ L"W1", L"Sends the WM_DESTROY message to the process' windows", TerminatorW1 },
{ L"W2", L"Sends the WM_QUIT message to the process' windows", TerminatorW2 },
{ L"W3", L"Sends the WM_CLOSE message to the process' windows", TerminatorW3 },
{ L"TJ1", L"Assigns the process to a job object and terminates the job", TerminatorTJ1 },
{ L"TD1", L"Debugs the process and closes the debug object", TerminatorTD1 },
{ L"TP3", L"Terminates the process in kernel-mode", TerminatorTP3 },
{ L"TT3", L"Terminates the process' threads in kernel-mode", TerminatorTT3 },
{ L"TT4", L"Terminates the process' threads using a dangerous kernel-mode method", TerminatorTT4 },
{ L"M1", L"Writes garbage to the process' memory regions", TerminatorM1 },
{ L"M2", L"Sets the page protection of the process' memory regions to PAGE_NOACCESS", TerminatorM2 }
}

Definition at line 774 of file termator.c.