[idd] implemented core shared memory functionallity and LGMP setup

This commit is contained in:
Geoffrey McRae
2023-04-10 14:02:47 +10:00
parent 77ddcfe489
commit 3c85957b99
15 changed files with 608 additions and 37 deletions

View File

@@ -1,10 +1,10 @@
#include "driver.h"
#include "driver.tmh"
#include "CPlatformInfo.h"
NTSTATUS DriverEntry(_In_ PDRIVER_OBJECT DriverObject, _In_ PUNICODE_STRING RegistryPath)
{
OutputDebugStringA(__FUNCTION__);
WDF_DRIVER_CONFIG config;
NTSTATUS status;
WDF_OBJECT_ATTRIBUTES attributes;
@@ -21,10 +21,10 @@ NTSTATUS DriverEntry(_In_ PDRIVER_OBJECT DriverObject, _In_ PUNICODE_STRING Reg
attributes.EvtCleanupCallback = LGIddEvtDriverContextCleanup;
WDF_DRIVER_CONFIG_INIT(&config, LGIddEvtDeviceAdd);
CPlatformInfo::Init();
status = WdfDriverCreate(DriverObject, RegistryPath, &attributes, &config, WDF_NO_HANDLE);
if (!NT_SUCCESS(status))
{
OutputDebugStringA(__FUNCTION__ " FAILURE");
TraceEvents(TRACE_LEVEL_ERROR, TRACE_DRIVER, "WdfDriverCreate failed %!STATUS!", status);
#if UMDF_VERSION_MAJOR == 2 && UMDF_VERSION_MINOR == 0
WPP_CLEANUP();
@@ -35,14 +35,11 @@ NTSTATUS DriverEntry(_In_ PDRIVER_OBJECT DriverObject, _In_ PUNICODE_STRING Reg
}
TraceEvents(TRACE_LEVEL_INFORMATION, TRACE_DRIVER, "%!FUNC! Exit");
OutputDebugStringA(__FUNCTION__ " SUCCESS");
return status;
}
NTSTATUS LGIddEvtDeviceAdd(_In_ WDFDRIVER Driver, _Inout_ PWDFDEVICE_INIT DeviceInit)
{
OutputDebugStringA(__FUNCTION__);
NTSTATUS status;
UNREFERENCED_PARAMETER(Driver);
@@ -54,8 +51,6 @@ NTSTATUS LGIddEvtDeviceAdd(_In_ WDFDRIVER Driver, _Inout_ PWDFDEVICE_INIT Device
VOID LGIddEvtDriverContextCleanup(_In_ WDFOBJECT DriverObject)
{
OutputDebugStringA(__FUNCTION__);
UNREFERENCED_PARAMETER(DriverObject);
TraceEvents(TRACE_LEVEL_INFORMATION, TRACE_DRIVER, "%!FUNC! Entry");