#include "drv_common.h"
ULONG DebugLevel = 4;
volatile LONG DeviceInstanceNumber = 0;
WDFDRIVER gWdfDriver = NULL;
#ifdef ALLOC_PRAGMA
#pragma alloc_text(INIT, DriverEntry)
#endif
NTSTATUS
DriverEntry(
__in PDRIVER_OBJECT DriverObject,
__in PUNICODE_STRING RegistryPath)
{
WDF_DRIVER_CONFIG config;
NTSTATUS status;
DbgPrint("[%s](%s) v%s built-on: %s %s\n", __FUNCTION__, RC_FILENAME_STR, RC_VERSION_STR, __DATE__, __TIME__);
WDF_DRIVER_CONFIG_INIT(
&config,
Device_OnAdd
);
config.EvtDriverUnload = DriverExit;
status = WdfDriverCreate(
DriverObject,
RegistryPath,
WDF_NO_OBJECT_ATTRIBUTES, &config, &gWdfDriver);
if (!NT_SUCCESS(status))
{
DbgPrint("Test\n");
USBERR("WdfDriverCreate failed. status=%Xh\n", status);
}
return status;
}
VOID DriverExit(__in WDFDRIVER Driver)
{
UNREFERENCED_PARAMETER(Driver);
PAGED_CODE();
DbgPrint("[%s](%s) v%s built-on: %s %s\n", __FUNCTION__, RC_FILENAME_STR, RC_VERSION_STR, __DATE__, __TIME__);
}