Process Hacker
thrdlist.c File Reference
#include <phapp.h>
#include <settings.h>
#include <extmgri.h>
#include <phplug.h>
#include <emenu.h>
#include <procprpp.h>

Go to the source code of this file.

Macros

#define SORT_FUNCTION(Column)   PhpThreadTreeNewCompare##Column
 
#define BEGIN_SORT_FUNCTION(Column)
 
#define END_SORT_FUNCTION
 

Functions

BOOLEAN PhpThreadNodeHashtableCompareFunction (_In_ PVOID Entry1, _In_ PVOID Entry2)
 
ULONG PhpThreadNodeHashtableHashFunction (_In_ PVOID Entry)
 
VOID PhpDestroyThreadNode (_In_ PPH_THREAD_NODE ThreadNode)
 
VOID PhpRemoveThreadNode (_In_ PPH_THREAD_NODE ThreadNode, _In_ PPH_THREAD_LIST_CONTEXT Context)
 
LONG PhpThreadTreeNewPostSortFunction (_In_ LONG Result, _In_ PVOID Node1, _In_ PVOID Node2, _In_ PH_SORT_ORDER SortOrder)
 
BOOLEAN NTAPI PhpThreadTreeNewCallback (_In_ HWND hwnd, _In_ PH_TREENEW_MESSAGE Message, _In_opt_ PVOID Parameter1, _In_opt_ PVOID Parameter2, _In_opt_ PVOID Context)
 
VOID PhInitializeThreadList (_In_ HWND ParentWindowHandle, _In_ HWND TreeNewHandle, _Out_ PPH_THREAD_LIST_CONTEXT Context)
 
VOID PhDeleteThreadList (_In_ PPH_THREAD_LIST_CONTEXT Context)
 
VOID PhLoadSettingsThreadList (_Inout_ PPH_THREAD_LIST_CONTEXT Context)
 
VOID PhSaveSettingsThreadList (_Inout_ PPH_THREAD_LIST_CONTEXT Context)
 
PPH_THREAD_NODE PhAddThreadNode (_Inout_ PPH_THREAD_LIST_CONTEXT Context, _In_ PPH_THREAD_ITEM ThreadItem, _In_ BOOLEAN FirstRun)
 
PPH_THREAD_NODE PhFindThreadNode (_In_ PPH_THREAD_LIST_CONTEXT Context, _In_ HANDLE ThreadId)
 
VOID PhRemoveThreadNode (_In_ PPH_THREAD_LIST_CONTEXT Context, _In_ PPH_THREAD_NODE ThreadNode)
 
VOID PhUpdateThreadNode (_In_ PPH_THREAD_LIST_CONTEXT Context, _In_ PPH_THREAD_NODE ThreadNode)
 
VOID PhTickThreadNodes (_In_ PPH_THREAD_LIST_CONTEXT Context)
 
 BEGIN_SORT_FUNCTION (Tid)
 
END_SORT_FUNCTION BEGIN_SORT_FUNCTION (Cpu)
 
END_SORT_FUNCTION BEGIN_SORT_FUNCTION (CyclesDelta)
 
END_SORT_FUNCTION BEGIN_SORT_FUNCTION (StartAddress)
 
END_SORT_FUNCTION BEGIN_SORT_FUNCTION (Priority)
 
END_SORT_FUNCTION BEGIN_SORT_FUNCTION (Service)
 
PPH_THREAD_ITEM PhGetSelectedThreadItem (_In_ PPH_THREAD_LIST_CONTEXT Context)
 
VOID PhGetSelectedThreadItems (_In_ PPH_THREAD_LIST_CONTEXT Context, _Out_ PPH_THREAD_ITEM **Threads, _Out_ PULONG NumberOfThreads)
 
VOID PhDeselectAllThreadNodes (_In_ PPH_THREAD_LIST_CONTEXT Context)
 

Macro Definition Documentation

#define BEGIN_SORT_FUNCTION (   Column)
Value:
static int __cdecl PhpThreadTreeNewCompare##Column( \
_In_ void *_context, \
_In_ const void *_elem1, \
_In_ const void *_elem2 \
) \
{ \
PPH_THREAD_NODE node1 = *(PPH_THREAD_NODE *)_elem1; \
PPH_THREAD_NODE node2 = *(PPH_THREAD_NODE *)_elem2; \
PPH_THREAD_ITEM threadItem1 = node1->ThreadItem; \
PPH_THREAD_ITEM threadItem2 = node2->ThreadItem; \
int sortResult = 0;

Definition at line 334 of file thrdlist.c.

#define END_SORT_FUNCTION
Value:
if (sortResult == 0) \
sortResult = uintptrcmp((ULONG_PTR)node1->ThreadId, (ULONG_PTR)node2->ThreadId); \
\
return PhModifySort(sortResult, context->TreeNewSortOrder); \
}

Definition at line 347 of file thrdlist.c.

#define SORT_FUNCTION (   Column)    PhpThreadTreeNewCompare##Column

Definition at line 332 of file thrdlist.c.

Function Documentation

BEGIN_SORT_FUNCTION ( Tid  )

Definition at line 367 of file thrdlist.c.

END_SORT_FUNCTION BEGIN_SORT_FUNCTION ( Cpu  )

Definition at line 373 of file thrdlist.c.

END_SORT_FUNCTION BEGIN_SORT_FUNCTION ( CyclesDelta  )

Definition at line 387 of file thrdlist.c.

END_SORT_FUNCTION BEGIN_SORT_FUNCTION ( StartAddress  )

Definition at line 396 of file thrdlist.c.

END_SORT_FUNCTION BEGIN_SORT_FUNCTION ( Priority  )

Definition at line 402 of file thrdlist.c.

END_SORT_FUNCTION BEGIN_SORT_FUNCTION ( Service  )

Definition at line 408 of file thrdlist.c.

PPH_THREAD_NODE PhAddThreadNode ( _Inout_ PPH_THREAD_LIST_CONTEXT  Context,
_In_ PPH_THREAD_ITEM  ThreadItem,
_In_ BOOLEAN  FirstRun 
)

Definition at line 192 of file thrdlist.c.

VOID PhDeleteThreadList ( _In_ PPH_THREAD_LIST_CONTEXT  Context)

Definition at line 106 of file thrdlist.c.

VOID PhDeselectAllThreadNodes ( _In_ PPH_THREAD_LIST_CONTEXT  Context)

Definition at line 717 of file thrdlist.c.

PPH_THREAD_NODE PhFindThreadNode ( _In_ PPH_THREAD_LIST_CONTEXT  Context,
_In_ HANDLE  ThreadId 
)

Definition at line 234 of file thrdlist.c.

PPH_THREAD_ITEM PhGetSelectedThreadItem ( _In_ PPH_THREAD_LIST_CONTEXT  Context)

Definition at line 669 of file thrdlist.c.

VOID PhGetSelectedThreadItems ( _In_ PPH_THREAD_LIST_CONTEXT  Context,
_Out_ PPH_THREAD_ITEM **  Threads,
_Out_ PULONG  NumberOfThreads 
)

Definition at line 690 of file thrdlist.c.

VOID PhInitializeThreadList ( _In_ HWND  ParentWindowHandle,
_In_ HWND  TreeNewHandle,
_Out_ PPH_THREAD_LIST_CONTEXT  Context 
)

Definition at line 63 of file thrdlist.c.

VOID PhLoadSettingsThreadList ( _Inout_ PPH_THREAD_LIST_CONTEXT  Context)

Definition at line 139 of file thrdlist.c.

VOID PhpDestroyThreadNode ( _In_ PPH_THREAD_NODE  ThreadNode)

Definition at line 281 of file thrdlist.c.

VOID PhpRemoveThreadNode ( _In_ PPH_THREAD_NODE  ThreadNode,
_In_ PPH_THREAD_LIST_CONTEXT  Context 
)

Definition at line 296 of file thrdlist.c.

BOOLEAN PhpThreadNodeHashtableCompareFunction ( _In_ PVOID  Entry1,
_In_ PVOID  Entry2 
)

Definition at line 121 of file thrdlist.c.

ULONG PhpThreadNodeHashtableHashFunction ( _In_ PVOID  Entry)

Definition at line 132 of file thrdlist.c.

END_SORT_FUNCTION BOOLEAN NTAPI PhpThreadTreeNewCallback ( _In_ HWND  hwnd,
_In_ PH_TREENEW_MESSAGE  Message,
_In_opt_ PVOID  Parameter1,
_In_opt_ PVOID  Parameter2,
_In_opt_ PVOID  Context 
)

Definition at line 414 of file thrdlist.c.

LONG PhpThreadTreeNewPostSortFunction ( _In_ LONG  Result,
_In_ PVOID  Node1,
_In_ PVOID  Node2,
_In_ PH_SORT_ORDER  SortOrder 
)

Definition at line 354 of file thrdlist.c.

VOID PhRemoveThreadNode ( _In_ PPH_THREAD_LIST_CONTEXT  Context,
_In_ PPH_THREAD_NODE  ThreadNode 
)

Definition at line 256 of file thrdlist.c.

VOID PhSaveSettingsThreadList ( _Inout_ PPH_THREAD_LIST_CONTEXT  Context)

Definition at line 178 of file thrdlist.c.

VOID PhTickThreadNodes ( _In_ PPH_THREAD_LIST_CONTEXT  Context)

Definition at line 325 of file thrdlist.c.

VOID PhUpdateThreadNode ( _In_ PPH_THREAD_LIST_CONTEXT  Context,
_In_ PPH_THREAD_NODE  ThreadNode 
)

Definition at line 313 of file thrdlist.c.