Rework new GUID's to use wdmguid.h versions instead of our own

This commit is contained in:
Jason Hart
2019-11-18 17:08:39 -05:00
parent 596c09680f
commit d4ccd17fd4
4 changed files with 16 additions and 30 deletions

View File

@@ -22,18 +22,10 @@
// have to be exposed by the PDO or else the child devices won't start
//
// {70211B0E-0AFB-47DB-AFC1-410BF842497A} PNP_LOCATION_INTERFACE from wdmguid.h being used as a dummy
// ReSharper disable once CppMissingIncludeGuard
DEFINE_GUID(GUID_DEVINTERFACE_XGIP_PNP_LOCATION_DUMMY,
0x70211B0E, 0x0AFB, 0x47DB, 0xAF, 0xC1, 0x41, 0x0B, 0xF8, 0x42, 0x49, 0x7A);
// {B38290E5-3CD0-4F9D-9937-F5FE2B44D47A} D3COLD_SUPPORT_INTERFACE from wdmguid.h being used as a dummy
DEFINE_GUID(GUID_DEVINTERFACE_XGIP_D3COLD_SUPPORT_DUMMY,
0xB38290E5, 0x3CD0, 0x4F9D, 0x99, 0x37, 0xF5, 0xFE, 0x2B, 0x44, 0xD4, 0x7A);
// {2AEB0243-6A6E-486B-82FC-D815F6B97006} REENUMERATE_SELF_INTERFACE_STANDARD from wdmguid.h being used as a dummy
DEFINE_GUID(GUID_DEVINTERFACE_XGIP_REENUMERATE_SELF_INTERFACE_STD_DUMMY,
0x2AEB0243, 0x6A6E, 0x486B, 0x82, 0xFC, 0xD8, 0x15, 0xF6, 0xB9, 0x70, 0x06);
// Below these interfaces are from wdmguid.h being used as dummies
// {70211B0E-0AFB-47DB-AFC1-410BF842497A} PNP_LOCATION_INTERFACE
// {B38290E5-3CD0-4F9D-9937-F5FE2B44D47A} D3COLD_SUPPORT_INTERFACE
// {2AEB0243-6A6E-486B-82FC-D815F6B97006} REENUMERATE_SELF_INTERFACE_STANDARD
// {DC7A8E51-49B3-4A3A-9E81-625205E7D729} Seems to be GUID_POWER_THREAD_INTERFACE
// Source: https://github.com/microsoft/Windows-Driver-Frameworks/blob/master/src/framework/shared/irphandlers/pnp/fxpkgpnp.cpp#L63

View File

@@ -24,18 +24,10 @@
// TODO: that statement might be obsolete, further testing required
//
// {70211B0E-0AFB-47DB-AFC1-410BF842497A} PNP_LOCATION_INTERFACE from wdmguid.h being used as a dummy
// ReSharper disable once CppMissingIncludeGuard
DEFINE_GUID(GUID_DEVINTERFACE_XUSB_PNP_LOCATION_DUMMY,
0x70211B0E, 0x0AFB, 0x47DB, 0xAF, 0xC1, 0x41, 0x0B, 0xF8, 0x42, 0x49, 0x7A);
// {B38290E5-3CD0-4F9D-9937-F5FE2B44D47A} D3COLD_SUPPORT_INTERFACE from wdmguid.h being used as a dummy
DEFINE_GUID(GUID_DEVINTERFACE_XUSB_D3COLD_SUPPORT_DUMMY,
0xB38290E5, 0x3CD0, 0x4F9D, 0x99, 0x37, 0xF5, 0xFE, 0x2B, 0x44, 0xD4, 0x7A);
// {2AEB0243-6A6E-486B-82FC-D815F6B97006} REENUMERATE_SELF_INTERFACE_STANDARD from wdmguid.h being used as a dummy
DEFINE_GUID(GUID_DEVINTERFACE_XUSB_REENUMERATE_SELF_INTERFACE_STD_DUMMY,
0x2AEB0243, 0x6A6E, 0x486B, 0x82, 0xFC, 0xD8, 0x15, 0xF6, 0xB9, 0x70, 0x06);
// Below these interfaces are from wdmguid.h being used as dummies
// {70211B0E-0AFB-47DB-AFC1-410BF842497A} PNP_LOCATION_INTERFACE
// {B38290E5-3CD0-4F9D-9937-F5FE2B44D47A} D3COLD_SUPPORT_INTERFACE
// {2AEB0243-6A6E-486B-82FC-D815F6B97006} REENUMERATE_SELF_INTERFACE_STANDARD
#pragma once

View File

@@ -18,6 +18,7 @@
#include "busenum.h"
#include <wdmguid.h> //Check if optimal to include EVERYTHING or just redefine
#include "xgip.tmh"
NTSTATUS Xgip_PreparePdo(PWDFDEVICE_INIT DeviceInit, PUNICODE_STRING DeviceId, PUNICODE_STRING DeviceDescription)

View File

@@ -18,6 +18,7 @@
#include "busenum.h"
#include <wdmguid.h> //Check if optimal to include EVERYTHING or just redefine
#include "xusb.tmh"
NTSTATUS Xusb_PreparePdo(
@@ -129,7 +130,7 @@ NTSTATUS Xusb_PrepareHardware(WDFDEVICE Device)
// Dummy PNP_LOCATION
WDF_QUERY_INTERFACE_CONFIG_INIT(&ifaceCfg, (PINTERFACE)&dummyIface, &GUID_DEVINTERFACE_XUSB_PNP_LOCATION_DUMMY, NULL);
WDF_QUERY_INTERFACE_CONFIG_INIT(&ifaceCfg, (PINTERFACE)&dummyIface, &GUID_PNP_LOCATION_INTERFACE, NULL);
status = WdfDeviceAddQueryInterface(Device, &ifaceCfg);
if (!NT_SUCCESS(status))
@@ -137,7 +138,7 @@ NTSTATUS Xusb_PrepareHardware(WDFDEVICE Device)
TraceEvents(TRACE_LEVEL_ERROR,
TRACE_XUSB,
"Couldn't register PNP_LOCATION dummy interface %!GUID! (WdfDeviceAddQueryInterface failed with status %!STATUS!)",
&GUID_DEVINTERFACE_XUSB_PNP_LOCATION_DUMMY,
&GUID_PNP_LOCATION_INTERFACE,
status);
return status;
@@ -145,7 +146,7 @@ NTSTATUS Xusb_PrepareHardware(WDFDEVICE Device)
// Dummy D3COLD_SUPPORT
WDF_QUERY_INTERFACE_CONFIG_INIT(&ifaceCfg, (PINTERFACE)&dummyIface, &GUID_DEVINTERFACE_XUSB_D3COLD_SUPPORT_DUMMY, NULL);
WDF_QUERY_INTERFACE_CONFIG_INIT(&ifaceCfg, (PINTERFACE)&dummyIface, &GUID_D3COLD_SUPPORT_INTERFACE, NULL);
status = WdfDeviceAddQueryInterface(Device, &ifaceCfg);
if (!NT_SUCCESS(status))
@@ -153,7 +154,7 @@ NTSTATUS Xusb_PrepareHardware(WDFDEVICE Device)
TraceEvents(TRACE_LEVEL_ERROR,
TRACE_XUSB,
"Couldn't register D3COLD_SUPPORT dummy interface %!GUID! (WdfDeviceAddQueryInterface failed with status %!STATUS!)",
&GUID_DEVINTERFACE_XUSB_D3COLD_SUPPORT_DUMMY,
&GUID_D3COLD_SUPPORT_INTERFACE,
status);
return status;
@@ -161,7 +162,7 @@ NTSTATUS Xusb_PrepareHardware(WDFDEVICE Device)
// Dummy REENUMERATE_SELF_INTERFACE_STANDARD
WDF_QUERY_INTERFACE_CONFIG_INIT(&ifaceCfg, (PINTERFACE)&dummyIface, &GUID_DEVINTERFACE_XUSB_REENUMERATE_SELF_INTERFACE_STD_DUMMY, NULL);
WDF_QUERY_INTERFACE_CONFIG_INIT(&ifaceCfg, (PINTERFACE)&dummyIface, &GUID_REENUMERATE_SELF_INTERFACE_STANDARD, NULL);
status = WdfDeviceAddQueryInterface(Device, &ifaceCfg);
if (!NT_SUCCESS(status))
@@ -169,7 +170,7 @@ NTSTATUS Xusb_PrepareHardware(WDFDEVICE Device)
TraceEvents(TRACE_LEVEL_ERROR,
TRACE_XUSB,
"Couldn't register REENUM_SELF_STD dummy interface %!GUID! (WdfDeviceAddQueryInterface failed with status %!STATUS!)",
&GUID_DEVINTERFACE_XUSB_REENUMERATE_SELF_INTERFACE_STD_DUMMY,
&GUID_REENUMERATE_SELF_INTERFACE_STANDARD,
status);
return status;