mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 10:04:49 +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)
|
||||
{
|
||||
lstrcpyW(DeviceIdBuffer, pDeviceID);
|
||||
|
||||
RpcTryExcept
|
||||
{
|
||||
/* Validate the device ID */
|
||||
ret = PNP_ValidateDeviceInstance(BindingHandle,
|
||||
DeviceIdBuffer,
|
||||
ulFlags);
|
||||
}
|
||||
RpcExcept(EXCEPTION_EXECUTE_HANDLER)
|
||||
{
|
||||
ret = RpcStatusToCmStatus(RpcExceptionCode());
|
||||
}
|
||||
RpcEndExcept;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -5963,25 +5976,10 @@ CM_Locate_DevNode_ExW(
|
|||
ret = RpcStatusToCmStatus(RpcExceptionCode());
|
||||
}
|
||||
RpcEndExcept;
|
||||
|
||||
if (ret != CR_SUCCESS)
|
||||
return CR_FAILURE;
|
||||
}
|
||||
|
||||
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)
|
||||
{
|
||||
*pdnDevInst = pSetupStringTableAddString(StringTable, DeviceIdBuffer, 1);
|
||||
|
|
Loading…
Reference in a new issue