Author: ekohl Date: Mon Jun 8 14:02:36 2015 New Revision: 68074
URL: http://svn.reactos.org/svn/reactos?rev=68074&view=rev Log: [NTOSKRNL] Add NtPlugPlayControl.PlugPlayControlQueryDeviceRelations.
Modified: trunk/reactos/include/ndk/cmtypes.h trunk/reactos/ntoskrnl/io/pnpmgr/plugplay.c
Modified: trunk/reactos/include/ndk/cmtypes.h URL: http://svn.reactos.org/svn/reactos/trunk/reactos/include/ndk/cmtypes.h?rev=6... ============================================================================== --- trunk/reactos/include/ndk/cmtypes.h [iso-8859-1] (original) +++ trunk/reactos/include/ndk/cmtypes.h [iso-8859-1] Mon Jun 8 14:02:36 2015 @@ -462,6 +462,15 @@ ULONG Depth; } PLUGPLAY_CONTROL_DEPTH_DATA, *PPLUGPLAY_CONTROL_DEPTH_DATA;
+// Class 0x10 +typedef struct _PLUGPLAY_CONTROL_DEVICE_RELATIONS_DATA +{ + UNICODE_STRING DeviceInstance; + ULONG Relations; // 0:EjectRelations, 1:RemovalRelations, 3:BusRelations + ULONG BufferSize; + PWCHAR Buffer; +} PLUGPLAY_CONTROL_DEVICE_RELATIONS_DATA, *PPLUGPLAY_CONTROL_DEVICE_RELATIONS_DATA; + // Class 0x14 typedef struct _PLUGPLAY_CONTROL_RESET_DEVICE_DATA {
Modified: trunk/reactos/ntoskrnl/io/pnpmgr/plugplay.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/io/pnpmgr/plugplay... ============================================================================== --- trunk/reactos/ntoskrnl/io/pnpmgr/plugplay.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/io/pnpmgr/plugplay.c [iso-8859-1] Mon Jun 8 14:02:36 2015 @@ -552,6 +552,7 @@ { return Status; } + DPRINT("Device name: '%wZ'\n", &DeviceInstance);
_SEH2_TRY @@ -616,6 +617,16 @@ return Status; }
+static +NTSTATUS +IopGetDeviceRelations(PPLUGPLAY_CONTROL_DEVICE_RELATIONS_DATA RelationsData) +{ + DPRINT("IopGetDeviceRelations() called\n"); + DPRINT("Device name: %wZ\n", &RelationsData->DeviceInstance); + DPRINT("Relations: %lu\n", &RelationsData->Relations); + + return STATUS_NOT_IMPLEMENTED; +}
static NTSTATUS IopGetDeviceDepth(PPLUGPLAY_CONTROL_DEPTH_DATA DepthData) @@ -673,6 +684,7 @@ { return Status; } + DPRINT("IopResetDevice(%wZ)\n", &DeviceInstance);
/* Get the device object */ @@ -961,11 +973,21 @@
switch (PlugPlayControlClass) { +// case PlugPlayControlEnumerateDevice: +// case PlugPlayControlRegisterNewDevice: +// case PlugPlayControlDeregisterDevice: +// case PlugPlayControlInitializeDevice: +// case PlugPlayControlStartDevice: +// case PlugPlayControlUnlockDevice: +// case PlugPlayControlQueryAndRemoveDevice: + case PlugPlayControlUserResponse: if (Buffer || BufferLength != 0) return STATUS_INVALID_PARAMETER; return IopRemovePlugPlayEvent();
+// case PlugPlayControlGenerateLegacyDevice: + case PlugPlayControlGetInterfaceDeviceList: if (!Buffer || BufferLength < sizeof(PLUGPLAY_CONTROL_INTERFACE_DEVICE_LIST_DATA)) return STATUS_INVALID_PARAMETER; @@ -976,11 +998,15 @@ return STATUS_INVALID_PARAMETER; return IopGetDeviceProperty((PPLUGPLAY_CONTROL_PROPERTY_DATA)Buffer);
+// case PlugPlayControlDeviceClassAssociation: + case PlugPlayControlGetRelatedDevice: if (!Buffer || BufferLength < sizeof(PLUGPLAY_CONTROL_RELATED_DEVICE_DATA)) return STATUS_INVALID_PARAMETER; return IopGetRelatedDevice((PPLUGPLAY_CONTROL_RELATED_DEVICE_DATA)Buffer);
+// case PlugPlayControlGetInterfaceDeviceAlias: + case PlugPlayControlDeviceStatus: if (!Buffer || BufferLength < sizeof(PLUGPLAY_CONTROL_STATUS_DATA)) return STATUS_INVALID_PARAMETER; @@ -991,11 +1017,23 @@ return STATUS_INVALID_PARAMETER; return IopGetDeviceDepth((PPLUGPLAY_CONTROL_DEPTH_DATA)Buffer);
+ case PlugPlayControlQueryDeviceRelations: + if (!Buffer || BufferLength < sizeof(PLUGPLAY_CONTROL_DEVICE_RELATIONS_DATA)) + return STATUS_INVALID_PARAMETER; + return IopGetDeviceRelations((PPLUGPLAY_CONTROL_DEVICE_RELATIONS_DATA)Buffer); + +// case PlugPlayControlTargetDeviceRelation: +// case PlugPlayControlQueryConflictList: +// case PlugPlayControlRetrieveDock: + case PlugPlayControlResetDevice: if (!Buffer || BufferLength < sizeof(PLUGPLAY_CONTROL_RESET_DEVICE_DATA)) return STATUS_INVALID_PARAMETER; return IopResetDevice((PPLUGPLAY_CONTROL_RESET_DEVICE_DATA)Buffer);
+// case PlugPlayControlHaltDevice: +// case PlugPlayControlGetBlockedDriverList: + default: return STATUS_NOT_IMPLEMENTED; }