user3272529
user3272529

Reputation: 115

wdk 8.1 kmdf driver blue screen

I am facing an annoying error while starting a kernelmode driver. Currently I am using a service to start the driver "on demand". The driver gets loaded but immediately fails with a bluescreen.

The code of the driver is very simple:

#include <ntddk.h>

NTSTATUS DriverEntry(PDRIVER_OBJECT DriverObject, PUNICODE_STRING RegistryPath)
{
    UNREFERENCED_PARAMETER(DriverObject);
    UNREFERENCED_PARAMETER(RegistryPath);
    DbgPrint("DriverEntry\n");
    return STATUS_SUCCESS;
}

I am fairly new to driver/kernel developement and thus I am just trying to do very small steps. Nevertheless I am not sure what information is relevant in order to enable somebody to give me the right hint.

Also I don't know how to interpret the data of the bluescreen. Can I find the displayed addresses in somekind of dumpfile that leads me to the error's source?

Is there a general "checklist" to avoid the most obvious errors that can occur during driver developement? Because I feel like the bug is not inside the driver's code.

I am currently using WDK 8.1 with MS Visual Studio 2015 Community on MS Windows 7 SP1 (64 Bit).

To be able to run the driver for test scenarios on my local machine, I disabled the driver signature enforcement some dozen times. Maybe that's some relevant information.

Thanks in advance :)

Upvotes: 2

Views: 296

Answers (1)

user3272529
user3272529

Reputation: 115

The problem is solved. The driver was built for a wrong OS-version. These are the steps necassary for retargeting a kernel mode driver in MS Visual Studio 2015 using WDK 8.1:

Go to the titlebar and select ...

Solution: Project -> Properties -> Driver Settings -> General -> Target OS Version

You can now choose the correct OS-version from a drop-down list.

Upvotes: 1

Related Questions