mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 01:55:19 +00:00
[UMPNPMGR] Fix hang when installing devices. Addendum to 0296fce00
.
This commit is contained in:
parent
0296fce00e
commit
27453fb759
1 changed files with 2 additions and 7 deletions
|
@ -3004,19 +3004,14 @@ GenerateDeviceID(
|
|||
_In_ PNP_RPC_STRING_LEN ulLength)
|
||||
{
|
||||
WCHAR szGeneratedInstance[MAX_DEVICE_ID_LEN];
|
||||
PWCHAR ptr;
|
||||
HKEY hKey;
|
||||
DWORD dwInstanceNumber;
|
||||
DWORD dwError = ERROR_SUCCESS;
|
||||
CONFIGRET ret = CR_SUCCESS;
|
||||
|
||||
/* Fail, if the device name contains backslashes */
|
||||
ptr = pszDeviceID;
|
||||
while (*ptr != UNICODE_NULL)
|
||||
{
|
||||
if (*ptr == L'\\')
|
||||
return CR_INVALID_DEVICE_ID;
|
||||
}
|
||||
if (wcschr(pszDeviceID, L'\\') != NULL)
|
||||
return CR_INVALID_DEVICE_ID;
|
||||
|
||||
/* Generated ID is: Root\<Device ID>\<Instance number> */
|
||||
dwInstanceNumber = 0;
|
||||
|
|
Loading…
Reference in a new issue