mirror of
https://github.com/reactos/reactos.git
synced 2025-08-03 00:27:13 +00:00
[NTVDM]: Don't display an error message if the VDD registry key (or value) just doesn't exist: it significates we just don't have any VDD to load...
Thanks to Lee Schroeder and oldman on the forum for having detected this :) svn path=/branches/ntvdm/; revision=61459
This commit is contained in:
parent
d944afa5c7
commit
e8d3c3e4bd
1 changed files with 24 additions and 7 deletions
|
@ -251,13 +251,20 @@ BOOL LoadInstallableVDD(VOID)
|
||||||
|
|
||||||
HANDLE hVDD;
|
HANDLE hVDD;
|
||||||
|
|
||||||
/* Open the VDD registry key */
|
/* Try to open the VDD registry key */
|
||||||
if (RegOpenKeyExW(HKEY_LOCAL_MACHINE,
|
Error = RegOpenKeyExW(HKEY_LOCAL_MACHINE,
|
||||||
VDDKeyName,
|
VDDKeyName,
|
||||||
0,
|
0,
|
||||||
KEY_QUERY_VALUE,
|
KEY_QUERY_VALUE,
|
||||||
&hVDDKey) != ERROR_SUCCESS)
|
&hVDDKey);
|
||||||
|
if (Error == ERROR_FILE_NOT_FOUND)
|
||||||
{
|
{
|
||||||
|
/* If the key just doesn't exist, don't do anything else */
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
else if (Error != ERROR_SUCCESS)
|
||||||
|
{
|
||||||
|
/* The key exists but there was an access error: display an error and quit */
|
||||||
DisplayMessage(ERROR_REGVDD);
|
DisplayMessage(ERROR_REGVDD);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
@ -272,8 +279,18 @@ BOOL LoadInstallableVDD(VOID)
|
||||||
&Type,
|
&Type,
|
||||||
NULL,
|
NULL,
|
||||||
&BufSize);
|
&BufSize);
|
||||||
if (Error != ERROR_SUCCESS || Type != REG_MULTI_SZ)
|
if (Error == ERROR_FILE_NOT_FOUND)
|
||||||
{
|
{
|
||||||
|
/* If the value just doesn't exist, don't do anything else */
|
||||||
|
Success = TRUE;
|
||||||
|
goto Quit;
|
||||||
|
}
|
||||||
|
else if (Error != ERROR_SUCCESS || Type != REG_MULTI_SZ)
|
||||||
|
{
|
||||||
|
/*
|
||||||
|
* The value exists but there was an access error or
|
||||||
|
* is of the wrong type: display an error and quit.
|
||||||
|
*/
|
||||||
DisplayMessage(ERROR_REGVDD);
|
DisplayMessage(ERROR_REGVDD);
|
||||||
Success = FALSE;
|
Success = FALSE;
|
||||||
goto Quit;
|
goto Quit;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue