|
#include "ProtoTypes.h"
#pragma alloc_text(INIT, DriverEntry)
/*............................................................................*/
/* Entry point of the device driver. */
/*............................................................................*/
NTSTATUS DriverEntry(
IN PDRIVER_OBJECT DriverObject,
IN PUNICODE_STRING RegistryPath
)
{
WDF_DRIVER_CONFIG config;
NTSTATUS status;
KdPrint((__DRIVER_NAME "--> DriverEntry\n"));
WDF_DRIVER_CONFIG_INIT(&config, EvtDeviceAdd);
status = WdfDriverCreate(
DriverObject,
RegistryPath,
WDF_NO_OBJECT_ATTRIBUTES,
&config,
WDF_NO_HANDLE);
if(!NT_SUCCESS(status))
{
KdPrint((__DRIVER_NAME "WdfDriverCreate failed with status 0x%08x\n", status));
}
KdPrint((__DRIVER_NAME "<-- DriverEntry\n"));
return status;
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
I am a former professional software developer (now a system admin) with an interest in everything that is about making hardware work. In the course of my work, I have programmed device drivers and services on Windows and linux.
I have written firmware for embedded devices in C and assembly language, and have designed and implemented real-time applications for testing of satellite payload equipment.
Generally, finding out how to interface hardware with software is my hobby and job.