Commit 10be16f3 authored by James Hawkins's avatar James Hawkins Committed by Alexandre Julliard

msi: Add tests for MsiSourceListSetInfo.

parent 1fa0e443
......@@ -260,7 +260,7 @@
264 stub MsiSourceListEnumSourcesW
265 stdcall MsiSourceListGetInfoA(str str long long str ptr ptr)
266 stdcall MsiSourceListGetInfoW(wstr wstr long long wstr ptr ptr)
267 stub MsiSourceListSetInfoA
267 stdcall MsiSourceListSetInfoA(str str long long str str)
268 stdcall MsiSourceListSetInfoW(wstr wstr long long wstr wstr)
269 stub MsiEnumPatchesExA
270 stub MsiEnumPatchesExW
......
......@@ -359,6 +359,35 @@ UINT WINAPI MsiSourceListGetInfoW( LPCWSTR szProduct, LPCWSTR szUserSid,
}
/******************************************************************
* MsiSourceListSetInfoA (MSI.@)
*/
UINT WINAPI MsiSourceListSetInfoA(LPCSTR szProduct, LPCSTR szUserSid,
MSIINSTALLCONTEXT dwContext, DWORD dwOptions,
LPCSTR szProperty, LPCSTR szValue)
{
UINT ret;
LPWSTR product = NULL;
LPWSTR usersid = NULL;
LPWSTR property = NULL;
LPWSTR value = NULL;
if (szProduct) product = strdupAtoW(szProduct);
if (szUserSid) usersid = strdupAtoW(szUserSid);
if (szProperty) property = strdupAtoW(szProperty);
if (szValue) value = strdupAtoW(szValue);
ret = MsiSourceListSetInfoW(product, usersid, dwContext, dwOptions,
property, value);
msi_free(product);
msi_free(usersid);
msi_free(property);
msi_free(value);
return ret;
}
/******************************************************************
* MsiSourceListSetInfoW (MSI.@)
*/
UINT WINAPI MsiSourceListSetInfoW( LPCWSTR szProduct, LPCWSTR szUserSid,
......@@ -374,6 +403,12 @@ UINT WINAPI MsiSourceListSetInfoW( LPCWSTR szProduct, LPCWSTR szUserSid,
if (!szProduct || lstrlenW(szProduct) > 39)
return ERROR_INVALID_PARAMETER;
if (!szProperty)
return ERROR_INVALID_PARAMETER;
if (!szValue)
return ERROR_UNKNOWN_PROPERTY;
if (dwOptions & MSICODE_PATCH)
{
FIXME("Unhandled options MSICODE_PATCH\n");
......@@ -386,7 +421,7 @@ UINT WINAPI MsiSourceListSetInfoW( LPCWSTR szProduct, LPCWSTR szUserSid,
if (dwContext == MSIINSTALLCONTEXT_USERUNMANAGED)
FIXME("Unknown context MSIINSTALLCONTEXT_USERUNMANAGED\n");
rc = OpenSourceKey(szProduct, &sourcekey, MSICODE_PRODUCT, dwContext, TRUE);
rc = OpenSourceKey(szProduct, &sourcekey, MSICODE_PRODUCT, dwContext, FALSE);
if (rc != ERROR_SUCCESS)
return ERROR_UNKNOWN_PRODUCT;
......
......@@ -2139,7 +2139,7 @@ static void test_Installer_InstallProduct(void)
/* Package name */
memset(szString, 0, sizeof(szString));
hr = Installer_ProductInfo(szProductCode, WINE_INSTALLPROPERTY_PACKAGENAMEW, szString);
ok(hr == S_OK, "Installer_ProductInfo failed, hresult 0x%08x\n", hr);
todo_wine ok(hr == S_OK, "Installer_ProductInfo failed, hresult 0x%08x\n", hr);
todo_wine ok_w2("Installer_ProductInfo returned %s but expected %s\n", szString, szMsifile);
/* Product name */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment