Commit 36229a74 authored by Juan Lang's avatar Juan Lang Committed by Alexandre Julliard

setupapi: Make error checking in SetupDiCreateDevRegKeyW more like that in SetupDiOpenDevRegKey.

parent 629123ba
......@@ -1264,6 +1264,16 @@ HKEY WINAPI SetupDiCreateDevRegKeyW(
SetLastError(ERROR_INVALID_PARAMETER);
return INVALID_HANDLE_VALUE;
}
if (Scope != DICS_FLAG_GLOBAL && Scope != DICS_FLAG_CONFIGSPECIFIC)
{
SetLastError(ERROR_INVALID_FLAGS);
return INVALID_HANDLE_VALUE;
}
if (KeyType != DIREG_DEV && KeyType != DIREG_DRV)
{
SetLastError(ERROR_INVALID_FLAGS);
return INVALID_HANDLE_VALUE;
}
if (devInfo->phantom)
{
SetLastError(ERROR_DEVINFO_NOT_REGISTERED);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment