mirror of
https://github.com/reactos/reactos.git
synced 2025-08-03 18:25:58 +00:00
[umpnpmgr][ndk] Implement PNP_RequestDeviceEject() and update unknown type in PLUGPLAY_CONTROL_QUERY_REMOVE_DATA
This commit is contained in:
parent
fb4591c48c
commit
13bb5e2317
2 changed files with 33 additions and 3 deletions
|
@ -2972,6 +2972,7 @@ PNP_QueryRemove(
|
||||||
pszDeviceID);
|
pszDeviceID);
|
||||||
PlugPlayData.VetoName = pszVetoName;
|
PlugPlayData.VetoName = pszVetoName;
|
||||||
PlugPlayData.NameLength = ulNameLength;
|
PlugPlayData.NameLength = ulNameLength;
|
||||||
|
// PlugPlayData.Flags =
|
||||||
|
|
||||||
Status = NtPlugPlayControl(PlugPlayControlQueryAndRemoveDevice,
|
Status = NtPlugPlayControl(PlugPlayControlQueryAndRemoveDevice,
|
||||||
&PlugPlayData,
|
&PlugPlayData,
|
||||||
|
@ -2994,8 +2995,37 @@ PNP_RequestDeviceEject(
|
||||||
DWORD ulNameLength,
|
DWORD ulNameLength,
|
||||||
DWORD ulFlags)
|
DWORD ulFlags)
|
||||||
{
|
{
|
||||||
UNIMPLEMENTED;
|
PLUGPLAY_CONTROL_QUERY_REMOVE_DATA PlugPlayData;
|
||||||
return CR_CALL_NOT_IMPLEMENTED;
|
NTSTATUS Status;
|
||||||
|
DWORD ret = CR_SUCCESS;
|
||||||
|
|
||||||
|
DPRINT1("PNP_RequestDeviceEject(%p %S %p %p %lu 0x%lx)\n",
|
||||||
|
hBinding, pszDeviceID, pVetoType, pszVetoName,
|
||||||
|
ulNameLength, ulFlags);
|
||||||
|
|
||||||
|
if (ulFlags != 0)
|
||||||
|
return CR_INVALID_FLAG;
|
||||||
|
|
||||||
|
if (pVetoType != NULL)
|
||||||
|
*pVetoType = PNP_VetoTypeUnknown;
|
||||||
|
|
||||||
|
if (pszVetoName != NULL && ulNameLength > 0)
|
||||||
|
*pszVetoName = UNICODE_NULL;
|
||||||
|
|
||||||
|
RtlZeroMemory(&PlugPlayData, sizeof(PlugPlayData));
|
||||||
|
RtlInitUnicodeString(&PlugPlayData.DeviceInstance,
|
||||||
|
pszDeviceID);
|
||||||
|
PlugPlayData.VetoName = pszVetoName;
|
||||||
|
PlugPlayData.NameLength = ulNameLength;
|
||||||
|
// PlugPlayData.Flags =
|
||||||
|
|
||||||
|
Status = NtPlugPlayControl(PlugPlayControlQueryAndRemoveDevice,
|
||||||
|
&PlugPlayData,
|
||||||
|
sizeof(PlugPlayData));
|
||||||
|
if (!NT_SUCCESS(Status))
|
||||||
|
ret = NtStatusToCrError(Status);
|
||||||
|
|
||||||
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -457,7 +457,7 @@ typedef struct _PLUGPLAY_CONTROL_ENUMERATE_DEVICE_DATA
|
||||||
typedef struct _PLUGPLAY_CONTROL_QUERY_REMOVE_DATA
|
typedef struct _PLUGPLAY_CONTROL_QUERY_REMOVE_DATA
|
||||||
{
|
{
|
||||||
UNICODE_STRING DeviceInstance;
|
UNICODE_STRING DeviceInstance;
|
||||||
ULONG Unknown2;
|
ULONG Flags;
|
||||||
PNP_VETO_TYPE VetoType;
|
PNP_VETO_TYPE VetoType;
|
||||||
LPWSTR VetoName;
|
LPWSTR VetoName;
|
||||||
ULONG NameLength;
|
ULONG NameLength;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue