MsiGetProperty should return empty strings on error.

This commit is contained in:
Aric Stewart 2004-07-06 18:54:38 +00:00 committed by Alexandre Julliard
parent 8f0a761948
commit d784600d81
1 changed files with 11 additions and 1 deletions

View File

@ -576,6 +576,12 @@ UINT WINAPI MsiGetPropertyA(MSIHANDLE hInstall, LPCSTR szName, LPSTR szValueBuf,
goto end;
}
if( *pchValueBuf > 0 )
{
/* be sure to blank the string first */
szValueBuf[0]=0;
}
hr = MsiGetPropertyW( hInstall, szwName, szwValueBuf, pchValueBuf );
if( *pchValueBuf > 0 )
@ -624,7 +630,11 @@ UINT WINAPI MsiGetPropertyW(MSIHANDLE hInstall, LPCWSTR szName,
{
DWORD sz;
WCHAR value[0x100];
/* even on unsuccessful lookup native msi blanks this string */
if (*pchValueBuf > 0)
szValueBuf[0] = 0;
rc = MsiViewExecute(view, 0);
if (rc != ERROR_SUCCESS)
{