Skip to content

A simple user-mode driver that sends the "Hello there!" message to the kernel debugger

Notifications You must be signed in to change notification settings

vinnik-dmitry07/user-mode-windows-driver

Repository files navigation

User Mode Windows Driver

A simple user-mode driver that sends the "Hello there!" message to the kernel debugger.

Steps

Make sure you have the Tracelog tool on your target computer. The tool is located in the <install_folder>Windows Kits\10\Tools<arch> folder of the WDK.

Open a Command Window and run as administrator.

Type the following command:

tracelog -start MyTrace -guid #c8d7d28f-5d1a-4ae1-96c2-7b02bc5412d1 -flag 0xFFFF -level 7-rt -kd

The command starts a trace session named MyTrace. In the Debugger Immediate Window you will see Hello there!

You can stop the trace session by typing the following command:

tracelog -stop MyTrace

The output should be similar to the following.

[0]0744.05F0::00/00/0000-00:00:00.000 [MyUSBDriver_UMDF_]CMyDevice::OnPrepareHardware Entry
[0]0744.05F0::00/00/0000-00:00:00.000 [MyUSBDriver_UMDF_]CMyDevice::OnPrepareHardware Exit
[1]0744.05F0::00/00/0000-00:00:00.000 [MyUSBDriver_UMDF_]CMyDevice::CreateInstanceAndInitialize Entry
[1]0744.05F0::00/00/0000-00:00:00.000 [MyUSBDriver_UMDF_]CMyDevice::Initialize Entry
[1]0744.05F0::00/00/0000-00:00:00.000 [MyUSBDriver_UMDF_]CMyDevice::Hello there!
[1]0744.05F0::00/00/0000-00:00:00.000 [MyUSBDriver_UMDF_]CMyDevice::Initialize Exit
[1]0744.05F0::00/00/0000-00:00:00.000 [MyUSBDriver_UMDF_]CMyDevice::CreateInstanceAndInitialize Exit
[1]0744.05F0::00/00/0000-00:00:00.000 [MyUSBDriver_UMDF_]CMyDevice::Configure Entry
[1]0744.05F0::00/00/0000-00:00:00.000 [MyUSBDriver_UMDF_]CMyIoQueue::CreateInstanceAndInitialize Entry
[1]0744.05F0::00/00/0000-00:00:00.000 [MyUSBDriver_UMDF_]CMyIoQueue::Initialize Entry
[1]0744.05F0::00/00/0000-00:00:00.000 [MyUSBDriver_UMDF_]CMyIoQueue::Initialize Exit
[1]0744.05F0::00/00/0000-00:00:00.000 [MyUSBDriver_UMDF_]CMyIoQueue::CreateInstanceAndInitialize Exit
[1]0744.05F0::00/00/0000-00:00:00.000 [MyUSBDriver_UMDF_]CMyDevice::Configure Exit

About

A simple user-mode driver that sends the "Hello there!" message to the kernel debugger

Topics

Resources

Stars

Watchers

Forks

Languages