#include <wdm.h>
HANDLE ThreadHandle;
struct TAPESH
{
LARGE_INTEGER tickCount;
unsigned long incrementCount;
} tapeshobj[30000];
volatile LARGE_INTEGER makeItLarge;
unsigned long Its_your_life = 0;
int i = 0;
VOID DriverUnload(PDRIVER_OBJECT pDriverObject)
{
DbgPrint("Driver unloading\n");
}
VOID LoopFunction()
{
while (1)
{
for (i = 0; i < 30000; ++i)
{
//KeQueryTickCount(&makeItLarge);
makeItLarge = KeQueryPerformanceCounter(NULL);
tapeshobj[i].tickCount = makeItLarge;
tapeshobj[i].incrementCount = Its_your_life++;
}
}
}
NTSTATUS DriverEntry(PDRIVER_OBJECT DriverObject, PUNICODE_STRING RegistryPath)
{
DbgPrint("Driver loading\n");
DriverObject->DriverUnload = DriverUnload;
if (PsCreateSystemThread(
&ThreadHandle,
(ACCESS_MASK) 0L,
NULL,
NULL,
NULL,
( PKSTART_ROUTINE ) LoopFunction,
NULL
) == STATUS_SUCCESS)
{
DbgPrint((" Thread Success "));
}
else
{
DbgPrint((" Thread Failed "));
}
return STATUS_SUCCESS;
}