Author: janderwald
Date: Sat Nov 8 13:28:01 2014
New Revision: 65322
URL:
http://svn.reactos.org/svn/reactos?rev=65322&view=rev
Log:
[NDK]
- adjust PLUGPLAY_CONTROL_INTERFACE_DEVICE_LIST_DATA
[UMPNPMGR]
- implement PNP_GetInterfaceDeviceList, PNP_GetInterfaceDeviceListSize
- currently not yet working PlugPlayControlGetInterfaceDeviceList class in
NtPlugPlayControl is not implemented
Modified:
trunk/reactos/base/services/umpnpmgr/umpnpmgr.c
trunk/reactos/include/ndk/cmtypes.h
Modified: trunk/reactos/base/services/umpnpmgr/umpnpmgr.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/services/umpnpmgr/ump…
==============================================================================
--- trunk/reactos/base/services/umpnpmgr/umpnpmgr.c [iso-8859-1] (original)
+++ trunk/reactos/base/services/umpnpmgr/umpnpmgr.c [iso-8859-1] Sat Nov 8 13:28:01 2014
@@ -169,6 +169,8 @@
{
case STATUS_NO_SUCH_DEVICE:
return CR_NO_SUCH_DEVINST;
+ case STATUS_NOT_IMPLEMENTED:
+ return CR_CALL_NOT_IMPLEMENTED;
default:
/* FIXME: add more mappings */
@@ -1223,8 +1225,34 @@
PNP_RPC_BUFFER_SIZE *pulLength,
DWORD ulFlags)
{
- UNIMPLEMENTED;
- return CR_CALL_NOT_IMPLEMENTED;
+ NTSTATUS Status;
+ PLUGPLAY_CONTROL_INTERFACE_DEVICE_LIST_DATA PlugPlayData;
+ DWORD ret = CR_SUCCESS;
+
+ UNREFERENCED_PARAMETER(hBinding);
+ UNREFERENCED_PARAMETER(ulFlags);
+
+ RtlInitUnicodeString(&PlugPlayData.DeviceInstance,
+ pszDeviceID);
+
+ PlugPlayData.FilterGuid = InterfaceGuid;
+ PlugPlayData.Buffer = Buffer;
+ PlugPlayData.BufferSize = *pulLength;
+
+ Status = NtPlugPlayControl(PlugPlayControlGetInterfaceDeviceList,
+ (PVOID)&PlugPlayData,
+ sizeof(PLUGPLAY_CONTROL_INTERFACE_DEVICE_LIST_DATA));
+ if (NT_SUCCESS(Status))
+ {
+ *pulLength = PlugPlayData.BufferSize;
+ }
+ else
+ {
+ ret = NtStatusToCrError(Status);
+ }
+
+ DPRINT("PNP_GetInterfaceDeviceListSize() done (returns %lx)\n", ret);
+ return ret;
}
@@ -1238,8 +1266,36 @@
LPWSTR pszDeviceID,
DWORD ulFlags)
{
- UNIMPLEMENTED;
- return CR_CALL_NOT_IMPLEMENTED;
+ NTSTATUS Status;
+ PLUGPLAY_CONTROL_INTERFACE_DEVICE_LIST_DATA PlugPlayData;
+ DWORD ret = CR_SUCCESS;
+
+ UNREFERENCED_PARAMETER(hBinding);
+ UNREFERENCED_PARAMETER(ulFlags);
+
+ DPRINT("PNP_GetInterfaceDeviceListSize() called\n");
+
+ RtlInitUnicodeString(&PlugPlayData.DeviceInstance,
+ pszDeviceID);
+
+ PlugPlayData.FilterGuid = InterfaceGuid;
+ PlugPlayData.Buffer = NULL;
+ PlugPlayData.BufferSize = 0;
+
+ Status = NtPlugPlayControl(PlugPlayControlGetInterfaceDeviceList,
+ (PVOID)&PlugPlayData,
+ sizeof(PLUGPLAY_CONTROL_INTERFACE_DEVICE_LIST_DATA));
+ if (NT_SUCCESS(Status))
+ {
+ *pulLen = PlugPlayData.BufferSize;
+ }
+ else
+ {
+ ret = NtStatusToCrError(Status);
+ }
+
+ DPRINT("PNP_GetInterfaceDeviceListSize() done (returns %lx)\n", ret);
+ return ret;
}
Modified: trunk/reactos/include/ndk/cmtypes.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ndk/cmtypes.h?rev=…
==============================================================================
--- trunk/reactos/include/ndk/cmtypes.h [iso-8859-1] (original)
+++ trunk/reactos/include/ndk/cmtypes.h [iso-8859-1] Sat Nov 8 13:28:01 2014
@@ -422,7 +422,7 @@
typedef struct _PLUGPLAY_CONTROL_INTERFACE_DEVICE_LIST_DATA
{
UNICODE_STRING DeviceInstance;
- LPWSTR FilterGuid;
+ LPGUID FilterGuid;
PVOID Buffer;
ULONG BufferSize;
} PLUGPLAY_CONTROL_INTERFACE_DEVICE_LIST_DATA,
*PPLUGPLAY_CONTROL_INTERFACE_DEVICE_LIST_DATA;