mirror of
https://github.com/reactos/reactos.git
synced 2025-08-07 00:23:02 +00:00
[UMPNPMGR] OpenConfigurationKey: Open subkeys depending on the configuration type
- Boot and Basic Configurations are located in the LogConf subkey. - Alloc and filtered Configurations are located in the Control subkey.
This commit is contained in:
parent
7f55dd36ea
commit
44a312478d
1 changed files with 23 additions and 1 deletions
|
@ -428,9 +428,11 @@ static
|
||||||
CONFIGRET
|
CONFIGRET
|
||||||
OpenConfigurationKey(
|
OpenConfigurationKey(
|
||||||
_In_ LPCWSTR pszDeviceID,
|
_In_ LPCWSTR pszDeviceID,
|
||||||
|
_In_ DWORD ulLogConfType,
|
||||||
_Out_ PHKEY phKey)
|
_Out_ PHKEY phKey)
|
||||||
{
|
{
|
||||||
WCHAR szKeyName[MAX_PATH];
|
WCHAR szKeyName[MAX_PATH];
|
||||||
|
PCWSTR pszSubKeyName;
|
||||||
HKEY hInstanceKey;
|
HKEY hInstanceKey;
|
||||||
DWORD dwError;
|
DWORD dwError;
|
||||||
|
|
||||||
|
@ -447,9 +449,26 @@ OpenConfigurationKey(
|
||||||
if (dwError != ERROR_SUCCESS)
|
if (dwError != ERROR_SUCCESS)
|
||||||
return CR_INVALID_DEVINST;
|
return CR_INVALID_DEVINST;
|
||||||
|
|
||||||
|
switch (ulLogConfType)
|
||||||
|
{
|
||||||
|
case BOOT_LOG_CONF:
|
||||||
|
case BASIC_LOG_CONF:
|
||||||
|
pszSubKeyName = L"LogConf";
|
||||||
|
break;
|
||||||
|
|
||||||
|
case ALLOC_LOG_CONF:
|
||||||
|
case FILTERED_LOG_CONF:
|
||||||
|
pszSubKeyName = L"Control";
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
DPRINT1("Unsupported configuration type!\n");
|
||||||
|
return CR_FAILURE;
|
||||||
|
}
|
||||||
|
|
||||||
/* Create or open the LogConf key */
|
/* Create or open the LogConf key */
|
||||||
dwError = RegCreateKeyExW(hInstanceKey,
|
dwError = RegCreateKeyExW(hInstanceKey,
|
||||||
L"LogConf",
|
pszSubKeyName,
|
||||||
0,
|
0,
|
||||||
NULL,
|
NULL,
|
||||||
REG_OPTION_NON_VOLATILE,
|
REG_OPTION_NON_VOLATILE,
|
||||||
|
@ -4197,6 +4216,7 @@ PNP_GetFirstLogConf(
|
||||||
return CR_INVALID_DEVINST;
|
return CR_INVALID_DEVINST;
|
||||||
|
|
||||||
ret = OpenConfigurationKey(pDeviceID,
|
ret = OpenConfigurationKey(pDeviceID,
|
||||||
|
ulLogConfType,
|
||||||
&hConfigKey);
|
&hConfigKey);
|
||||||
if (ret != CR_SUCCESS)
|
if (ret != CR_SUCCESS)
|
||||||
{
|
{
|
||||||
|
@ -4297,6 +4317,7 @@ PNP_GetNextLogConf(
|
||||||
return CR_INVALID_DEVINST;
|
return CR_INVALID_DEVINST;
|
||||||
|
|
||||||
ret = OpenConfigurationKey(pDeviceID,
|
ret = OpenConfigurationKey(pDeviceID,
|
||||||
|
ulLogConfType,
|
||||||
&hConfigKey);
|
&hConfigKey);
|
||||||
if (ret != CR_SUCCESS)
|
if (ret != CR_SUCCESS)
|
||||||
{
|
{
|
||||||
|
@ -4445,6 +4466,7 @@ PNP_GetNextResDes(
|
||||||
return CR_INVALID_DEVINST;
|
return CR_INVALID_DEVINST;
|
||||||
|
|
||||||
ret = OpenConfigurationKey(pDeviceID,
|
ret = OpenConfigurationKey(pDeviceID,
|
||||||
|
ulLogConfType,
|
||||||
&hConfigKey);
|
&hConfigKey);
|
||||||
if (ret != CR_SUCCESS)
|
if (ret != CR_SUCCESS)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue