Process Hacker
main.c File Reference
#include <phapp.h>
#include <kphuser.h>
#include <phsvc.h>
#include <settings.h>
#include <extmgri.h>
#include <hexedit.h>
#include <colorbox.h>
#include <shlobj.h>

Go to the source code of this file.

Macros

#define PH_ARG_SETTINGS   1
 
#define PH_ARG_NOSETTINGS   2
 
#define PH_ARG_SHOWVISIBLE   3
 
#define PH_ARG_SHOWHIDDEN   4
 
#define PH_ARG_COMMANDMODE   5
 
#define PH_ARG_COMMANDTYPE   6
 
#define PH_ARG_COMMANDOBJECT   7
 
#define PH_ARG_COMMANDACTION   8
 
#define PH_ARG_COMMANDVALUE   9
 
#define PH_ARG_RUNASSERVICEMODE   10
 
#define PH_ARG_NOKPH   11
 
#define PH_ARG_INSTALLKPH   12
 
#define PH_ARG_UNINSTALLKPH   13
 
#define PH_ARG_DEBUG   14
 
#define PH_ARG_HWND   15
 
#define PH_ARG_POINT   16
 
#define PH_ARG_SHOWOPTIONS   17
 
#define PH_ARG_PHSVC   18
 
#define PH_ARG_NOPLUGINS   19
 
#define PH_ARG_NEWINSTANCE   20
 
#define PH_ARG_ELEVATE   21
 
#define PH_ARG_SILENT   22
 
#define PH_ARG_HELP   23
 
#define PH_ARG_SELECTPID   24
 
#define PH_ARG_PRIORITY   25
 
#define PH_ARG_PLUGIN   26
 
#define PH_ARG_SELECTTAB   27
 

Functions

LONG PhMainMessageLoop (VOID)
 
VOID PhActivatePreviousInstance (VOID)
 
VOID PhInitializeCommonControls (VOID)
 
VOID PhInitializeKph (VOID)
 
BOOLEAN PhInitializeAppSystem (VOID)
 
VOID PhpInitializeSettings (VOID)
 
VOID PhpProcessStartupParameters (VOID)
 
VOID PhpEnablePrivileges (VOID)
 
INT WINAPI wWinMain (_In_ HINSTANCE hInstance, _In_opt_ HINSTANCE hPrevInstance, _In_ PWSTR lpCmdLine, _In_ INT nCmdShow)
 
VOID PhRegisterDialog (_In_ HWND DialogWindowHandle)
 
VOID PhUnregisterDialog (_In_ HWND DialogWindowHandle)
 
struct
_PH_MESSAGE_LOOP_FILTER_ENTRY
PhRegisterMessageLoopFilter (_In_ PPH_MESSAGE_LOOP_FILTER Filter, _In_opt_ PVOID Context)
 
VOID PhUnregisterMessageLoopFilter (_In_ struct _PH_MESSAGE_LOOP_FILTER_ENTRY *FilterEntry)
 
HFONT PhpCreateFont (_In_ HWND hWnd, _In_ PWSTR Name, _In_ ULONG Size, _In_ ULONG Weight)
 
VOID PhInitializeFont (_In_ HWND hWnd)
 
BOOLEAN NTAPI PhpCommandLineOptionCallback (_In_opt_ PPH_COMMAND_LINE_OPTION Option, _In_opt_ PPH_STRING Value, _In_opt_ PVOID Context)
 

Variables

PPH_STRING PhApplicationDirectory
 
PPH_STRING PhApplicationFileName
 
PHAPPAPI HFONT PhApplicationFont
 
PPH_STRING PhCurrentUserName = NULL
 
HINSTANCE PhInstanceHandle
 
PPH_STRING PhLocalSystemName = NULL
 
BOOLEAN PhPluginsEnabled = FALSE
 
PPH_STRING PhSettingsFileName = NULL
 
PH_INTEGER_PAIR PhSmallIconSize = { 16, 16 }
 
PH_INTEGER_PAIR PhLargeIconSize = { 32, 32 }
 
PH_STARTUP_PARAMETERS PhStartupParameters
 
PH_PROVIDER_THREAD PhPrimaryProviderThread
 
PH_PROVIDER_THREAD PhSecondaryProviderThread
 

Macro Definition Documentation

#define PH_ARG_COMMANDACTION   8

Definition at line 661 of file main.c.

#define PH_ARG_COMMANDMODE   5

Definition at line 658 of file main.c.

#define PH_ARG_COMMANDOBJECT   7

Definition at line 660 of file main.c.

#define PH_ARG_COMMANDTYPE   6

Definition at line 659 of file main.c.

#define PH_ARG_COMMANDVALUE   9

Definition at line 662 of file main.c.

#define PH_ARG_DEBUG   14

Definition at line 667 of file main.c.

#define PH_ARG_ELEVATE   21

Definition at line 674 of file main.c.

#define PH_ARG_HELP   23

Definition at line 676 of file main.c.

#define PH_ARG_HWND   15

Definition at line 668 of file main.c.

#define PH_ARG_INSTALLKPH   12

Definition at line 665 of file main.c.

#define PH_ARG_NEWINSTANCE   20

Definition at line 673 of file main.c.

#define PH_ARG_NOKPH   11

Definition at line 664 of file main.c.

#define PH_ARG_NOPLUGINS   19

Definition at line 672 of file main.c.

#define PH_ARG_NOSETTINGS   2

Definition at line 655 of file main.c.

#define PH_ARG_PHSVC   18

Definition at line 671 of file main.c.

#define PH_ARG_PLUGIN   26

Definition at line 679 of file main.c.

#define PH_ARG_POINT   16

Definition at line 669 of file main.c.

#define PH_ARG_PRIORITY   25

Definition at line 678 of file main.c.

#define PH_ARG_RUNASSERVICEMODE   10

Definition at line 663 of file main.c.

#define PH_ARG_SELECTPID   24

Definition at line 677 of file main.c.

#define PH_ARG_SELECTTAB   27

Definition at line 680 of file main.c.

#define PH_ARG_SETTINGS   1

Definition at line 654 of file main.c.

#define PH_ARG_SHOWHIDDEN   4

Definition at line 657 of file main.c.

#define PH_ARG_SHOWOPTIONS   17

Definition at line 670 of file main.c.

#define PH_ARG_SHOWVISIBLE   3

Definition at line 656 of file main.c.

#define PH_ARG_SILENT   22

Definition at line 675 of file main.c.

#define PH_ARG_UNINSTALLKPH   13

Definition at line 666 of file main.c.

Function Documentation

VOID PhActivatePreviousInstance ( VOID  )

Definition at line 400 of file main.c.

BOOLEAN PhInitializeAppSystem ( VOID  )

Definition at line 518 of file main.c.

VOID PhInitializeCommonControls ( VOID  )

Definition at line 422 of file main.c.

VOID PhInitializeFont ( _In_ HWND  hWnd)

Definition at line 479 of file main.c.

VOID PhInitializeKph ( VOID  )

Definition at line 500 of file main.c.

LONG PhMainMessageLoop ( VOID  )

Definition at line 272 of file main.c.

BOOLEAN NTAPI PhpCommandLineOptionCallback ( _In_opt_ PPH_COMMAND_LINE_OPTION  Option,
_In_opt_ PPH_STRING  Value,
_In_opt_ PVOID  Context 
)

Definition at line 682 of file main.c.

HFONT PhpCreateFont ( _In_ HWND  hWnd,
_In_ PWSTR  Name,
_In_ ULONG  Size,
_In_ ULONG  Weight 
)

Definition at line 439 of file main.c.

VOID PhpEnablePrivileges ( VOID  )

Definition at line 956 of file main.c.

VOID PhpInitializeSettings ( VOID  )

Definition at line 546 of file main.c.

VOID PhpProcessStartupParameters ( VOID  )

Definition at line 824 of file main.c.

VOID PhRegisterDialog ( _In_ HWND  DialogWindowHandle)

Definition at line 340 of file main.c.

struct _PH_MESSAGE_LOOP_FILTER_ENTRY* PhRegisterMessageLoopFilter ( _In_ PPH_MESSAGE_LOOP_FILTER  Filter,
_In_opt_ PVOID  Context 
)
read

Definition at line 365 of file main.c.

VOID PhUnregisterDialog ( _In_ HWND  DialogWindowHandle)

Definition at line 350 of file main.c.

VOID PhUnregisterMessageLoopFilter ( _In_ struct _PH_MESSAGE_LOOP_FILTER_ENTRY FilterEntry)

Definition at line 383 of file main.c.

INT WINAPI wWinMain ( _In_ HINSTANCE  hInstance,
_In_opt_ HINSTANCE  hPrevInstance,
_In_ PWSTR  lpCmdLine,
_In_ INT  nCmdShow 
)

Definition at line 83 of file main.c.

Variable Documentation

PPH_STRING PhApplicationDirectory

Definition at line 64 of file main.c.

PPH_STRING PhApplicationFileName

Definition at line 65 of file main.c.

PHAPPAPI HFONT PhApplicationFont

Definition at line 66 of file main.c.

PPH_STRING PhCurrentUserName = NULL

Definition at line 67 of file main.c.

HINSTANCE PhInstanceHandle

Definition at line 68 of file main.c.

PH_INTEGER_PAIR PhLargeIconSize = { 32, 32 }

Definition at line 73 of file main.c.

PPH_STRING PhLocalSystemName = NULL

Definition at line 69 of file main.c.

BOOLEAN PhPluginsEnabled = FALSE

Definition at line 70 of file main.c.

PH_PROVIDER_THREAD PhPrimaryProviderThread

Definition at line 76 of file main.c.

PH_PROVIDER_THREAD PhSecondaryProviderThread

Definition at line 77 of file main.c.

PPH_STRING PhSettingsFileName = NULL

Definition at line 71 of file main.c.

PH_INTEGER_PAIR PhSmallIconSize = { 16, 16 }

Definition at line 72 of file main.c.

PH_STARTUP_PARAMETERS PhStartupParameters

Definition at line 74 of file main.c.