appwiz.cpl: Fix two RegQueryValueExW calls.

This commit is contained in:
Hans Leidekker 2011-01-10 09:43:19 +01:00 committed by Alexandre Julliard
parent 3440e768dd
commit f6c46e41a2
1 changed files with 4 additions and 2 deletions

View File

@ -181,7 +181,8 @@ static BOOL ReadApplicationsFromRegistry(HKEY root)
uninstlen = 0;
if (!RegQueryValueExW(hkeyApp, DisplayNameW, 0, 0, NULL, &displen))
{
if (!RegQueryValueExW(hkeyApp, WindowsInstallerW, NULL, &dwType, NULL, &value)
DWORD size = sizeof(value);
if (!RegQueryValueExW(hkeyApp, WindowsInstallerW, NULL, &dwType, (LPBYTE)&value, &size)
&& dwType == REG_DWORD && value == 1)
{
static const WCHAR fmtW[] = {'m','s','i','e','x','e','c',' ','/','x','%','s',0};
@ -282,7 +283,8 @@ static BOOL ReadApplicationsFromRegistry(HKEY root)
/* Fetch the modify path */
if (!dwNoModify)
{
if (!RegQueryValueExW(hkeyApp, WindowsInstallerW, NULL, &dwType, NULL, &value)
size = sizeof(value);
if (!RegQueryValueExW(hkeyApp, WindowsInstallerW, NULL, &dwType, (LPBYTE)&value, &size)
&& dwType == REG_DWORD && value == 1)
{
static const WCHAR fmtW[] = {'m','s','i','e','x','e','c',' ','/','i','%','s',0};