mirror of
https://github.com/reactos/reactos.git
synced 2025-01-01 03:54:02 +00:00
[UMPNPMGR] Implement PNP_QueryRemove()
This commit is contained in:
parent
7633ebcfde
commit
3d9a702d2b
1 changed files with 30 additions and 2 deletions
|
@ -2950,8 +2950,36 @@ PNP_QueryRemove(
|
||||||
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_QueryRemove(%p %S %p %p %lu 0x%lx)\n",
|
||||||
|
hBinding, pszDeviceID, pVetoType, pszVetoName,
|
||||||
|
ulNameLength, ulFlags);
|
||||||
|
|
||||||
|
if (ulFlags & ~CM_REMOVE_BITS)
|
||||||
|
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;
|
||||||
|
|
||||||
|
Status = NtPlugPlayControl(PlugPlayControlQueryAndRemoveDevice,
|
||||||
|
&PlugPlayData,
|
||||||
|
sizeof(PlugPlayData));
|
||||||
|
if (!NT_SUCCESS(Status))
|
||||||
|
ret = NtStatusToCrError(Status);
|
||||||
|
|
||||||
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue