mirror of
https://github.com/gnif/LookingGlass.git
synced 2026-08-09 08:41:31 +00:00
[idd] ipc: connect LGInput to LGIdd
Move the reusable named-pipe endpoint and shared support code into the LGCommon static library. Run a dedicated server in LGIdd and a reconnecting client in LGInput, with device-lifecycle handling and report framing. Refactor the helper pipe to use the same endpoint implementation.
This commit is contained in:
@@ -24,6 +24,7 @@
|
||||
#include "CDebug.h"
|
||||
#include "platform/CPlatformInfo.h"
|
||||
#include "VersionInfo.h"
|
||||
#include "ipc/CInputPipeServer.h"
|
||||
#include "ipc/CPipeServer.h"
|
||||
|
||||
NTSTATUS DriverEntry(_In_ PDRIVER_OBJECT DriverObject, _In_ PUNICODE_STRING RegistryPath)
|
||||
@@ -45,6 +46,13 @@ NTSTATUS DriverEntry(_In_ PDRIVER_OBJECT DriverObject, _In_ PUNICODE_STRING Reg
|
||||
goto fail;
|
||||
}
|
||||
|
||||
if (!g_inputPipeServer.Init())
|
||||
{
|
||||
status = STATUS_UNSUCCESSFUL;
|
||||
DEBUG_ERROR("Failed to setup the LGInput IPC pipe");
|
||||
goto fail;
|
||||
}
|
||||
|
||||
WDF_DRIVER_CONFIG config;
|
||||
WDF_OBJECT_ATTRIBUTES attributes;
|
||||
|
||||
@@ -66,6 +74,8 @@ NTSTATUS DriverEntry(_In_ PDRIVER_OBJECT DriverObject, _In_ PUNICODE_STRING Reg
|
||||
return status;
|
||||
|
||||
fail:
|
||||
g_inputPipeServer.DeInit();
|
||||
g_pipe.DeInit();
|
||||
#if UMDF_VERSION_MAJOR == 2 && UMDF_VERSION_MINOR == 0
|
||||
WPP_CLEANUP();
|
||||
#else
|
||||
@@ -91,6 +101,7 @@ VOID LGIddEvtDriverContextCleanup(_In_ WDFOBJECT DriverObject)
|
||||
|
||||
TraceEvents(TRACE_LEVEL_INFORMATION, TRACE_DRIVER, "%!FUNC! Entry");
|
||||
|
||||
g_inputPipeServer.DeInit();
|
||||
g_pipe.DeInit();
|
||||
|
||||
#if UMDF_VERSION_MAJOR == 2 && UMDF_VERSION_MINOR == 0
|
||||
|
||||
Reference in New Issue
Block a user