msi: MsiCollectUserInfo cannot be called from a custom action (Coverity 565, 566).

oldstable
James Hawkins 2009-03-22 14:31:13 -07:00 committed by Alexandre Julliard
parent cb958cd773
commit baf86bd5bb
1 changed files with 8 additions and 0 deletions

View File

@ -2927,7 +2927,11 @@ UINT WINAPI MsiCollectUserInfoW(LPCWSTR szProduct)
if (rc != ERROR_SUCCESS)
return ERROR_INVALID_PARAMETER;
/* MsiCollectUserInfo cannot be called from a custom action. */
package = msihandle2msiinfo(handle, MSIHANDLETYPE_PACKAGE);
if (!package)
return ERROR_CALL_NOT_IMPLEMENTED;
rc = ACTION_PerformUIAction(package, szFirstRun, -1);
msiobj_release( &package->hdr );
@ -2949,7 +2953,11 @@ UINT WINAPI MsiCollectUserInfoA(LPCSTR szProduct)
if (rc != ERROR_SUCCESS)
return ERROR_INVALID_PARAMETER;
/* MsiCollectUserInfo cannot be called from a custom action. */
package = msihandle2msiinfo(handle, MSIHANDLETYPE_PACKAGE);
if (!package)
return ERROR_CALL_NOT_IMPLEMENTED;
rc = ACTION_PerformUIAction(package, szFirstRun, -1);
msiobj_release( &package->hdr );