58 _In_opt_ PVOID Parameter1,
59 _In_opt_ PVOID Parameter2,
60 _In_opt_ PVOID Context
64 _In_ HWND ParentWindowHandle,
65 _In_ HWND TreeNewHandle,
72 Context->EnableStateHighlighting =
TRUE;
82 Context->ParentWindowHandle = ParentWindowHandle;
83 Context->TreeNewHandle = TreeNewHandle;
118 for (i = 0; i < Context->NodeList->Count; i++)
164 settings =
PhCmSaveSettingsEx(Context->TreeNewHandle, &Context->Cm, 0, &sortSettings);
173 _In_ BOOLEAN HideUnnamedHandles
179 if (Context->HideUnnamedHandles != HideUnnamedHandles)
181 Context->HideUnnamedHandles = HideUnnamedHandles;
185 for (i = 0; i < Context->NodeList->Count; i++)
224 if (Context->EnableStateHighlighting && RunId != 1)
229 &Context->NodeStateList,
236 handleNode->
Handle = HandleItem->Handle;
266 lookupHandleNode.
Handle = Handle;
269 Context->NodeHashtable,
287 if (Context->EnableStateHighlighting)
291 &HandleNode->ShState,
292 &Context->NodeStateList,
295 Context->TreeNewHandle
310 if (HandleNode->GrantedAccessSymbolicText)
PhDereferenceObject(HandleNode->GrantedAccessSymbolicText);
326 if ((index = PhFindItemList(Context->NodeList, HandleNode)) != -1)
352 #define SORT_FUNCTION(Column) PhpHandleTreeNewCompare##Column
354 #define BEGIN_SORT_FUNCTION(Column) static int __cdecl PhpHandleTreeNewCompare##Column( \
355 _In_ void *_context, \
356 _In_ const void *_elem1, \
357 _In_ const void *_elem2 \
360 PPH_HANDLE_NODE node1 = *(PPH_HANDLE_NODE *)_elem1; \
361 PPH_HANDLE_NODE node2 = *(PPH_HANDLE_NODE *)_elem2; \
362 PPH_HANDLE_ITEM handleItem1 = node1->HandleItem; \
363 PPH_HANDLE_ITEM handleItem2 = node2->HandleItem; \
364 PPH_HANDLE_LIST_CONTEXT context = (PPH_HANDLE_LIST_CONTEXT)_context; \
367 #define END_SORT_FUNCTION \
368 if (sortResult == 0) \
369 sortResult = uintptrcmp((ULONG_PTR)node1->Handle, (ULONG_PTR)node2->Handle); \
371 return PhModifySort(sortResult, context->TreeNewSortOrder); \
401 sortResult =
uintptrcmp((ULONG_PTR)node1->Handle, (ULONG_PTR)node2->Handle);
407 sortResult =
uintptrcmp((ULONG_PTR)handleItem1->Object, (ULONG_PTR)handleItem2->Object);
413 sortResult =
uintcmp(handleItem1->Attributes, handleItem2->Attributes);
419 sortResult =
uintcmp(handleItem1->GrantedAccess, handleItem2->GrantedAccess);
442 _In_opt_ PVOID Parameter1,
443 _In_opt_ PVOID Parameter2,
444 _In_opt_ PVOID Context
461 if (!getChildren->
Node)
463 static PVOID sortFunctions[] =
475 int (__cdecl *sortFunction)(
void *,
const void *,
const void *);
520 switch (getCellText->
Id)
557 ULONG numberOfAccessEntries;
636 if (GetKeyState(VK_CONTROL) < 0)
640 if (GetKeyState(VK_CONTROL) < 0)
648 if (GetKeyState(VK_CONTROL) >= 0)
686 PULONG code = Parameter2;
688 if (PtrToUlong(Parameter1) == VK_RETURN)
690 *code = DLGC_WANTMESSAGE;
707 for (i = 0; i < Context->NodeList->Count; i++)
724 _Out_ PULONG NumberOfHandles
732 for (i = 0; i < Context->NodeList->Count; i++)
743 *NumberOfHandles = list->
Count;