26 typedef struct _ETP_DISK_PACKET
28 SLIST_ENTRY ListEntry;
48 _In_opt_ PVOID Parameter,
49 _In_opt_ PVOID Context
68 static LARGE_INTEGER EtpPerformanceFrequency;
75 LARGE_INTEGER performanceCounter;
90 NtQueryPerformanceCounter(&performanceCounter, &EtpPerformanceFrequency);
101 &ProcessesUpdatedCallbackRegistration
217 pair.
Key = Event->FileObject;
229 pair.
Key = Event->FileObject;
246 _In_ PVOID FileObject
253 pair.
Key = FileObject;
275 BOOLEAN added =
FALSE;
277 diskEvent = &Packet->Event;
286 if (!Packet->FileName)
344 if (EtpPerformanceFrequency.QuadPart != 0)
365 _In_ PULONG64 Buffer,
366 _In_ ULONG BufferSize,
367 _In_ ULONG BufferPosition,
368 _In_ ULONG BufferCount,
369 _In_ ULONG NumberToConsider
379 if (NumberToConsider > BufferCount)
380 NumberToConsider = BufferCount;
382 if (NumberToConsider == 0)
385 count = NumberToConsider;
394 }
while (--count != 0);
396 return sum / NumberToConsider;
400 _In_opt_ PVOID Parameter,
401 _In_opt_ PVOID Context
404 static ULONG runCount = 0;
406 PSLIST_ENTRY listEntry;
407 PLIST_ENTRY ageListEntry;
418 listEntry = listEntry->Next;
422 if (packet->FileName)
436 diskItem = CONTAINING_RECORD(ageListEntry,
ET_DISK_ITEM, AgeListEntry);
437 ageListEntry = ageListEntry->Blink;
457 diskItem = CONTAINING_RECORD(ageListEntry,
ET_DISK_ITEM, AgeListEntry);
491 if (diskItem->
AddTime != runCount)
493 BOOLEAN modified =
FALSE;
531 ageListEntry = ageListEntry->Flink;