From 93644c0a3538944db49dc02ba64096dc2f43b9c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20H=C3=B6glinger-Stelzer?= Date: Mon, 11 May 2020 12:46:18 +0200 Subject: [PATCH] Implementing I/O handler --- sys/EmulationTargetPDO.cpp | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/sys/EmulationTargetPDO.cpp b/sys/EmulationTargetPDO.cpp index c222a0c..43b3084 100644 --- a/sys/EmulationTargetPDO.cpp +++ b/sys/EmulationTargetPDO.cpp @@ -447,10 +447,25 @@ VOID ViGEm::Bus::Core::EmulationTargetPDO::EvtIoInternalDeviceControl( _In_ ULONG IoControlCode ) { - UNREFERENCED_PARAMETER(Queue); + const auto ctx = EmulationTargetPdoGetContext(WdfIoQueueGetDevice(Queue)); + UNREFERENCED_PARAMETER(OutputBufferLength); UNREFERENCED_PARAMETER(InputBufferLength); UNREFERENCED_PARAMETER(IoControlCode); + NTSTATUS status = STATUS_INVALID_PARAMETER; + PIRP irp; + PURB urb; + PIO_STACK_LOCATION irpStack; + PUCHAR blobBuffer; + + TraceEvents(TRACE_LEVEL_VERBOSE, TRACE_BUSPDO, "%!FUNC! Entry"); + + // No help from the framework available from here on + irp = WdfRequestWdmGetIrp(Request); + irpStack = IoGetCurrentIrpStackLocation(irp); + + + WdfRequestComplete(Request, STATUS_UNSUCCESSFUL); }