msi: szUserSid must be NULL if context is MSIINSTALLCONTEXT_MACHINE.

This commit is contained in:
James Hawkins 2007-11-05 04:32:45 -05:00 committed by Alexandre Julliard
parent 14d439c863
commit 21619964da
2 changed files with 3 additions and 6 deletions

View File

@ -667,8 +667,8 @@ UINT WINAPI MsiSourceListAddSourceExW( LPCWSTR szProduct, LPCWSTR szUserSid,
return ERROR_FUNCTION_FAILED;
}
if (szUserSid)
FIXME("Unhandled UserSid %s\n",debugstr_w(szUserSid));
if (szUserSid && (dwContext & MSIINSTALLCONTEXT_MACHINE))
return ERROR_INVALID_PARAMETER;
rc = OpenSourceKey(szProduct, &sourcekey, MSICODE_PRODUCT, dwContext, FALSE);
if (rc != ERROR_SUCCESS)

View File

@ -659,10 +659,7 @@ static void test_MsiSourceListAddSourceEx(void)
r = pMsiSourceListAddSourceExA(prodcode, usersid,
MSIINSTALLCONTEXT_MACHINE,
MSICODE_PRODUCT | MSISOURCETYPE_URL, "C:\\source", 0);
todo_wine
{
ok(r == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %d\n", r);
}
ok(r == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %d\n", r);
r = pMsiSourceListAddSourceExA(prodcode, NULL,
MSIINSTALLCONTEXT_MACHINE,