-
-
[求助]这段代码怎么老是5秒后蓝屏
-
发表于:
2010-11-28 15:06
5025
-
/* _Define at C++ */
#ifdef __cplusplus
extern "C"
{
#endif
#include <NTDDK.h>
#ifdef __cplusplus
}
#endif
/* _Memory Section*/
#define INITCODE code_seg("INIT")
#define LOCKCODE code_seg()
#pragma LOCKCODE
VOID onDpc(PKDPC pDpc,PVOID p1,PVOID p2,PVOID p3)
{
KdPrint(("Test Is OK!\n"));
}
/* _Unload Routine */
VOID TestMinUnload(PDRIVER_OBJECT DriverObject)
{
KdPrint(("TestMin UnLoad OK!\n"));
}
/* _Enter Point */
#pragma INITCODE
NTSTATUS DriverEntry(PDRIVER_OBJECT pDriverObject,PUNICODE_STRING RegistryPath)
{
KdPrint(("Enter TestMin EnterPoint!\n"));
KTIMER ktimer;
KeInitializeTimer(&ktimer);
KDPC dpc;
KeInitializeDpc(&dpc,onDpc,NULL);
KeSetTimer(&ktimer,RtlConvertLongToLargeInteger(-10*1000*1000*5),&dpc);
pDriverObject->DriverUnload = TestMinUnload;
return STATUS_SUCCESS;
}
[课程]Linux pwn 探索篇!