27 typedef struct _PHP_CREATE_HANDLE_ITEM_CONTEXT
90 return handleProvider;
130 handleItem->
Handle = (HANDLE)Handle->HandleValue;
132 handleItem->
Object = Handle->Object;
134 handleItem->
Attributes = Handle->HandleAttributes;
135 handleItem->
GrantedAccess = (ACCESS_MASK)Handle->GrantedAccess;
163 return Value1->Handle == Value2->Handle;
170 return (ULONG)Value->Handle / 4;
182 lookupHandleItem.
Handle = Handle;
184 HandleProvider->HandleHashSet,
185 HandleProvider->HandleHashSetSize,
189 for (; entry; entry = entry->
Next)
229 for (i = 0; i < HandleProvider->HandleHashSetSize; i++)
231 entry = HandleProvider->HandleHashSet[i];
249 if (HandleProvider->HandleHashSetSize < HandleProvider->HandleHashSetCount + 1)
252 &HandleProvider->HandleHashSet,
253 &HandleProvider->HandleHashSetSize,
254 HandleProvider->HandleHashSetSize * 2
259 HandleProvider->HandleHashSet,
260 HandleProvider->HandleHashSetSize,
264 HandleProvider->HandleHashSetCount++;
272 PhRemoveEntryHashSet(HandleProvider->HandleHashSet, HandleProvider->HandleHashSetSize, &HandleItem->HashEntry);
273 HandleProvider->HandleHashSetCount--;
289 _In_ HANDLE ProcessHandle,
291 _Out_ PBOOLEAN FilterNeeded
315 convertedHandles = PhAllocate(
335 *Handles = convertedHandles;
336 *FilterNeeded =
FALSE;
353 *FilterNeeded =
TRUE;
360 ULONG allocatedCount;
370 allocatedCount = 100;
372 convertedHandles = PhAllocate(
382 if (count == allocatedCount)
385 convertedHandles = PhReAllocate(
407 *Handles = convertedHandles;
408 *FilterNeeded =
FALSE;
411 return STATUS_SUCCESS;
424 context->Provider->ProcessHandle,
426 context->Handle->ObjectTypeIndex,
453 return STATUS_SUCCESS;
461 static ULONG fileObjectTypeIndex = -1;
465 BOOLEAN filterNeeded;
467 ULONG numberOfHandles;
471 BOOLEAN useWorkQueue =
FALSE;
506 for (i = 0; i < (ULONG)numberOfHandles; i++)
522 for (i = 0; i < (ULONG)numberOfHandles; i++)
545 BOOLEAN found =
FALSE;
553 (PVOID)(handleItem->
Handle)
556 if (tempHashtableValue)
562 if (handleItem->
Object == (*tempHashtableValue)->Object)
573 if (!handlesToRemove)
585 for (i = 0; i < handlesToRemove->
Count; i++)
618 context->Provider = handleProvider;
619 context->Handle = handle;
678 BOOLEAN modified =
FALSE;