Home > Back-end >  Point DriverMonitor stop driver button, the computer to restart
Point DriverMonitor stop driver button, the computer to restart

Time:10-02

Write a simple driver
#include
# define INITCODE code_seg (" INIT ")
# pragma INITCODE//this code shows to add this function to INIT memory area
VOID DDK_Unload (PDRIVER_OBJECT IN pDriverObject);//front, unload routine
NTSTATUS DriverEntry (PDRIVER_OBJECT pDriverObject, PUNICODE_STRING B)
{
PDriverObject - & gt; DriverUnload=DDK_Unload;//DriverUnload: specify the driver unload when using the callback function address
KdPrint ((" drive success is loaded... OK++ + + + + \ n "));
The return (1);
}

VOID DDK_Unload (PDRIVER_OBJECT IN pDriverObject)
{
KdPrint ((" drive successfully uninstalled... OK -- -- -- -- -- - \ n "));
DbgPrint (" uninstall success ");//free version and the check will be performed
}

In the VC compiler generates sys file, and then start in DriverMonitor driver can capture to drive success in Debugview is loaded, click on the stop of DriverMonitor driver key, restart the computer, thank you for your help to take a look at this problem, urgent urgent,,,

CodePudding user response:

His roof, and tested the, and the use of vc compiler. Sys file will encounter these problems, if change to the inside of the WDK command-line compiler, error will disappear, or don't know why couldn't make the vc compiler

CodePudding user response:

Vs2013 can be directly compiled you can have a try,
  • Related