Hi all,
I have problem building my driver (it is a HID mini driver which is setup as filter driver),- I can’t figure this simple problem out - what else do I need to include?
I receive the following error message:
error LNK2019: unresolved external symbol _TraceEvents referenced in function _DriverEntry@8
This is coming from my driver entry routine where my trace statements are. I have included all the includes from hidusbfx2.h and have the trace.h file in my directory.
My sources file builds just the single file that has driver entry routine. I added stubs for the other routines I need.
Also, is it bad to have both old DDK installed and the new DDK installed on the same development machine (they are in their respective directories 3790.1830, 7600.16385.1).
Here’s my code:
NTSTATUS
DriverEntry(PDRIVER_OBJECT DriverObject, PUNICODE_STRING RegistryPath)
{
NTSTATUS status = STATUS_SUCCESS;
WDF_DRIVER_CONFIG config;
//
// Initialize WPP Tracing
//
WPP_INIT_TRACING( DriverObject, RegistryPath );
TraceEvents(TRACE_LEVEL_INFORMATION, DBG_INIT,
“VJoy Driver Built %s %s\n”, DATE, TIME);
WDF_DRIVER_CONFIG_INIT(&config, VJoyEvtDeviceAdd);
//
// Create a framework driver object to represent our driver.
//
status = WdfDriverCreate(DriverObject,
RegistryPath,
WDF_NO_OBJECT_ATTRIBUTES,
&config, // Driver Config Info
WDF_NO_HANDLE);
if (!NT_SUCCESS(status)) {
TraceEvents(TRACE_LEVEL_ERROR, DBG_INIT,
“WdfDriverCreate failed with status 0x%x\n”, status);
WPP_CLEANUP(DriverObject);
}
return status;
}