mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 15:23:03 +00:00
[SETUPAPI] CM_Locate_DevNode_ExW: The root device does not need to be validated
This commit is contained in:
parent
ea3e4bb4cb
commit
dde7e6e254
1 changed files with 14 additions and 16 deletions
|
@ -5948,6 +5948,19 @@ CM_Locate_DevNode_ExW(
|
||||||
if (pDeviceID != NULL && lstrlenW(pDeviceID) != 0)
|
if (pDeviceID != NULL && lstrlenW(pDeviceID) != 0)
|
||||||
{
|
{
|
||||||
lstrcpyW(DeviceIdBuffer, pDeviceID);
|
lstrcpyW(DeviceIdBuffer, pDeviceID);
|
||||||
|
|
||||||
|
RpcTryExcept
|
||||||
|
{
|
||||||
|
/* Validate the device ID */
|
||||||
|
ret = PNP_ValidateDeviceInstance(BindingHandle,
|
||||||
|
DeviceIdBuffer,
|
||||||
|
ulFlags);
|
||||||
|
}
|
||||||
|
RpcExcept(EXCEPTION_EXECUTE_HANDLER)
|
||||||
|
{
|
||||||
|
ret = RpcStatusToCmStatus(RpcExceptionCode());
|
||||||
|
}
|
||||||
|
RpcEndExcept;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -5963,25 +5976,10 @@ CM_Locate_DevNode_ExW(
|
||||||
ret = RpcStatusToCmStatus(RpcExceptionCode());
|
ret = RpcStatusToCmStatus(RpcExceptionCode());
|
||||||
}
|
}
|
||||||
RpcEndExcept;
|
RpcEndExcept;
|
||||||
|
|
||||||
if (ret != CR_SUCCESS)
|
|
||||||
return CR_FAILURE;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
TRACE("DeviceIdBuffer: %s\n", debugstr_w(DeviceIdBuffer));
|
TRACE("DeviceIdBuffer: %s\n", debugstr_w(DeviceIdBuffer));
|
||||||
|
|
||||||
RpcTryExcept
|
|
||||||
{
|
|
||||||
/* Validate the device ID */
|
|
||||||
ret = PNP_ValidateDeviceInstance(BindingHandle,
|
|
||||||
DeviceIdBuffer,
|
|
||||||
ulFlags);
|
|
||||||
}
|
|
||||||
RpcExcept(EXCEPTION_EXECUTE_HANDLER)
|
|
||||||
{
|
|
||||||
ret = RpcStatusToCmStatus(RpcExceptionCode());
|
|
||||||
}
|
|
||||||
RpcEndExcept;
|
|
||||||
|
|
||||||
if (ret == CR_SUCCESS)
|
if (ret == CR_SUCCESS)
|
||||||
{
|
{
|
||||||
*pdnDevInst = pSetupStringTableAddString(StringTable, DeviceIdBuffer, 1);
|
*pdnDevInst = pSetupStringTableAddString(StringTable, DeviceIdBuffer, 1);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue