From 2d5ba8d20d3b2d1b7010c3cf2c9d7f80153cdc52 Mon Sep 17 00:00:00 2001 From: James Hawkins Date: Thu, 21 Feb 2008 00:02:08 -0600 Subject: [PATCH] msi: Implement MsiSourceListEnumSources. --- dlls/msi/source.c | 102 +++++++++++-- dlls/msi/tests/install.c | 20 +-- dlls/msi/tests/source.c | 305 ++++++++++++++++----------------------- 3 files changed, 219 insertions(+), 208 deletions(-) diff --git a/dlls/msi/source.c b/dlls/msi/source.c index 55371228385..53a2821c662 100644 --- a/dlls/msi/source.c +++ b/dlls/msi/source.c @@ -61,21 +61,21 @@ static UINT OpenSourceKey(LPCWSTR szProduct, HKEY* key, DWORD dwOptions, if (context == MSIINSTALLCONTEXT_USERUNMANAGED) { - if (dwOptions == MSICODE_PATCH) + if (dwOptions & MSICODE_PATCH) rc = MSIREG_OpenUserPatchesKey(szProduct, &rootkey, create); else rc = MSIREG_OpenUserProductsKey(szProduct, &rootkey, create); } else if (context == MSIINSTALLCONTEXT_USERMANAGED) { - if (dwOptions == MSICODE_PATCH) + if (dwOptions & MSICODE_PATCH) rc = MSIREG_OpenUserPatchesKey(szProduct, &rootkey, create); else rc = MSIREG_OpenLocalManagedProductKey(szProduct, &rootkey, create); } else if (context == MSIINSTALLCONTEXT_MACHINE) { - if (dwOptions == MSICODE_PATCH) + if (dwOptions & MSICODE_PATCH) rc = MSIREG_OpenPatchesKey(szProduct, &rootkey, create); else rc = MSIREG_OpenLocalClassesProductKey(szProduct, &rootkey, create); @@ -83,7 +83,7 @@ static UINT OpenSourceKey(LPCWSTR szProduct, HKEY* key, DWORD dwOptions, if (rc != ERROR_SUCCESS) { - if (dwOptions == MSICODE_PATCH) + if (dwOptions & MSICODE_PATCH) return ERROR_UNKNOWN_PATCH; else return ERROR_UNKNOWN_PRODUCT; @@ -152,13 +152,20 @@ UINT WINAPI MsiSourceListEnumSourcesA(LPCSTR szProductCodeOrPatch, LPCSTR szUser LPWSTR usersid = NULL; LPWSTR source = NULL; DWORD len = 0; - UINT r; + UINT r = ERROR_INVALID_PARAMETER; + static int index = 0; TRACE("(%s, %s, %d, %d, %d, %p, %p)\n", debugstr_a(szProductCodeOrPatch), debugstr_a(szUserSid), dwContext, dwOptions, dwIndex, szSource, pcchSource); + if (dwIndex == 0) + index = 0; + if (szSource && !pcchSource) - return ERROR_INVALID_PARAMETER; + goto done; + + if (dwIndex != index) + goto done; if (szProductCodeOrPatch) product = strdupAtoW(szProductCodeOrPatch); if (szUserSid) usersid = strdupAtoW(szUserSid); @@ -170,7 +177,10 @@ UINT WINAPI MsiSourceListEnumSourcesA(LPCSTR szProductCodeOrPatch, LPCSTR szUser source = msi_alloc(++len * sizeof(WCHAR)); if (!source) - return ERROR_OUTOFMEMORY; + { + r = ERROR_OUTOFMEMORY; + goto done; + } *source = '\0'; r = MsiSourceListEnumSourcesW(product, usersid, dwContext, dwOptions, @@ -191,20 +201,92 @@ done: msi_free(usersid); msi_free(source); + if (r == ERROR_SUCCESS) + { + if (szSource) index++; + } + else if (dwIndex > index) + index = 0; + return r; } /****************************************************************** - * MsiSourceListEnumSourcesA (MSI.@) + * MsiSourceListEnumSourcesW (MSI.@) */ UINT WINAPI MsiSourceListEnumSourcesW(LPCWSTR szProductCodeOrPatch, LPCWSTR szUserSid, MSIINSTALLCONTEXT dwContext, DWORD dwOptions, DWORD dwIndex, LPWSTR szSource, LPDWORD pcchSource) { - FIXME("(%s, %s, %d, %d, %d, %p, %p): stub!\n", debugstr_w(szProductCodeOrPatch), + WCHAR squished_pc[GUID_SIZE]; + WCHAR name[32]; + HKEY source = NULL; + HKEY subkey = NULL; + LONG res; + UINT r = ERROR_INVALID_PARAMETER; + static int index = 0; + + static const WCHAR format[] = {'%','d',0}; + + TRACE("(%s, %s, %d, %d, %d, %p, %p)\n", debugstr_w(szProductCodeOrPatch), debugstr_w(szUserSid), dwContext, dwOptions, dwIndex, szSource, pcchSource); - return ERROR_CALL_NOT_IMPLEMENTED; + + if (dwIndex == 0) + index = 0; + + if (!szProductCodeOrPatch || !squash_guid(szProductCodeOrPatch, squished_pc)) + goto done; + + if (szSource && !pcchSource) + goto done; + + if (!(dwOptions & (MSISOURCETYPE_NETWORK | MSISOURCETYPE_URL))) + goto done; + + if ((dwOptions & MSISOURCETYPE_NETWORK) && (dwOptions & MSISOURCETYPE_URL)) + goto done; + + if (dwContext == MSIINSTALLCONTEXT_MACHINE && szUserSid) + goto done; + + if (dwIndex != index) + goto done; + + r = OpenSourceKey(szProductCodeOrPatch, &source, + dwOptions, dwContext, FALSE); + if (r != ERROR_SUCCESS) + goto done; + + if (dwOptions & MSISOURCETYPE_NETWORK) + r = OpenNetworkSubkey(source, &subkey, FALSE); + else if (dwOptions & MSISOURCETYPE_URL) + r = OpenURLSubkey(source, &subkey, FALSE); + + if (r != ERROR_SUCCESS) + { + r = ERROR_NO_MORE_ITEMS; + goto done; + } + + sprintfW(name, format, dwIndex + 1); + + res = RegQueryValueExW(subkey, name, 0, 0, (LPBYTE)szSource, pcchSource); + if (res != ERROR_SUCCESS && res != ERROR_MORE_DATA) + r = ERROR_NO_MORE_ITEMS; + +done: + RegCloseKey(subkey); + RegCloseKey(source); + + if (r == ERROR_SUCCESS) + { + if (szSource) index++; + } + else if (dwIndex > index) + index = 0; + + return r; } /****************************************************************** diff --git a/dlls/msi/tests/install.c b/dlls/msi/tests/install.c index f91e764250d..bb87cd189f3 100644 --- a/dlls/msi/tests/install.c +++ b/dlls/msi/tests/install.c @@ -2923,10 +2923,7 @@ static void test_publishsourcelist(void) size = 0xdeadbeef; r = MsiSourceListEnumSourcesA(prodcode, NULL, MSIINSTALLCONTEXT_USERUNMANAGED, MSICODE_PRODUCT | MSISOURCETYPE_URL, 0, NULL, &size); - todo_wine - { - ok(r == ERROR_UNKNOWN_PRODUCT, "Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r); - } + ok(r == ERROR_UNKNOWN_PRODUCT, "Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r); ok(size == 0xdeadbeef, "Expected 0xdeadbeef, got %d\n", size); r = MsiInstallProductA(msifile, "REGISTER_PRODUCT=1"); @@ -2944,10 +2941,7 @@ static void test_publishsourcelist(void) size = 0xdeadbeef; r = MsiSourceListEnumSourcesA(prodcode, NULL, MSIINSTALLCONTEXT_USERUNMANAGED, MSICODE_PRODUCT | MSISOURCETYPE_URL, 0, NULL, &size); - todo_wine - { - ok(r == ERROR_UNKNOWN_PRODUCT, "Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r); - } + ok(r == ERROR_UNKNOWN_PRODUCT, "Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r); ok(size == 0xdeadbeef, "Expected 0xdeadbeef, got %d\n", size); r = MsiInstallProductA(msifile, "PROCESS_COMPONENTS=1"); @@ -2965,10 +2959,7 @@ static void test_publishsourcelist(void) size = 0xdeadbeef; r = MsiSourceListEnumSourcesA(prodcode, NULL, MSIINSTALLCONTEXT_USERUNMANAGED, MSICODE_PRODUCT | MSISOURCETYPE_URL, 0, NULL, &size); - todo_wine - { - ok(r == ERROR_UNKNOWN_PRODUCT, "Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r); - } + ok(r == ERROR_UNKNOWN_PRODUCT, "Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r); ok(size == 0xdeadbeef, "Expected 0xdeadbeef, got %d\n", size); r = MsiInstallProductA(msifile, "PUBLISH_FEATURES=1"); @@ -2986,10 +2977,7 @@ static void test_publishsourcelist(void) size = 0xdeadbeef; r = MsiSourceListEnumSourcesA(prodcode, NULL, MSIINSTALLCONTEXT_USERUNMANAGED, MSICODE_PRODUCT | MSISOURCETYPE_URL, 0, NULL, &size); - todo_wine - { - ok(r == ERROR_UNKNOWN_PRODUCT, "Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r); - } + ok(r == ERROR_UNKNOWN_PRODUCT, "Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r); ok(size == 0xdeadbeef, "Expected 0xdeadbeef, got %d\n", size); r = MsiInstallProductA(msifile, "PUBLISH_PRODUCT=1"); diff --git a/dlls/msi/tests/source.c b/dlls/msi/tests/source.c index 6f704df386c..e76a277bdaa 100644 --- a/dlls/msi/tests/source.c +++ b/dlls/msi/tests/source.c @@ -768,30 +768,21 @@ static void test_MsiSourceListEnumSources(void) size = 0xdeadbeef; r = MsiSourceListEnumSourcesA(NULL, usersid, MSIINSTALLCONTEXT_USERUNMANAGED, MSICODE_PRODUCT | MSISOURCETYPE_NETWORK, 0, value, &size); - 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); ok(size == 0xdeadbeef, "Expected 0xdeadbeef, got %d\n", size); /* empty szProductCodeOrPatchCode */ size = 0xdeadbeef; r = MsiSourceListEnumSourcesA("", usersid, MSIINSTALLCONTEXT_USERUNMANAGED, MSICODE_PRODUCT | MSISOURCETYPE_NETWORK, 0, value, &size); - 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); ok(size == 0xdeadbeef, "Expected 0xdeadbeef, got %d\n", size); /* garbage szProductCodeOrPatchCode */ size = 0xdeadbeef; r = MsiSourceListEnumSourcesA("garbage", usersid, MSIINSTALLCONTEXT_USERUNMANAGED, MSICODE_PRODUCT | MSISOURCETYPE_NETWORK, 0, value, &size); - 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); ok(size == 0xdeadbeef, "Expected 0xdeadbeef, got %d\n", size); /* guid without brackets */ @@ -799,10 +790,7 @@ static void test_MsiSourceListEnumSources(void) r = MsiSourceListEnumSourcesA("51CD2AD5-0482-4C46-8DDD-0ED1022AA1AA", usersid, MSIINSTALLCONTEXT_USERUNMANAGED, MSICODE_PRODUCT | MSISOURCETYPE_NETWORK, 0, value, &size); - 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); ok(size == 0xdeadbeef, "Expected 0xdeadbeef, got %d\n", size); /* guid with brackets */ @@ -810,10 +798,7 @@ static void test_MsiSourceListEnumSources(void) r = MsiSourceListEnumSourcesA("{51CD2AD5-0482-4C46-8DDD-0ED1022AA1AA}", usersid, MSIINSTALLCONTEXT_USERUNMANAGED, MSICODE_PRODUCT | MSISOURCETYPE_NETWORK, 0, value, &size); - todo_wine - { - ok(r == ERROR_UNKNOWN_PRODUCT, "Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r); - } + ok(r == ERROR_UNKNOWN_PRODUCT, "Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r); ok(size == 0xdeadbeef, "Expected 0xdeadbeef, got %d\n", size); /* MSIINSTALLCONTEXT_USERUNMANAGED */ @@ -823,10 +808,7 @@ static void test_MsiSourceListEnumSources(void) r = MsiSourceListEnumSourcesA(prodcode, usersid, MSIINSTALLCONTEXT_USERUNMANAGED, MSICODE_PRODUCT | MSISOURCETYPE_URL, 0, value, &size); - todo_wine - { - ok(r == ERROR_UNKNOWN_PRODUCT, "Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r); - } + ok(r == ERROR_UNKNOWN_PRODUCT, "Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r); ok(!lstrcmpA(value, "aaa"), "Expected value to be unchanged, got %s\n", value); ok(size == MAX_PATH, "Expected MAX_PATH, got %d\n", size); @@ -842,10 +824,7 @@ static void test_MsiSourceListEnumSources(void) r = MsiSourceListEnumSourcesA(prodcode, usersid, MSIINSTALLCONTEXT_USERUNMANAGED, MSICODE_PRODUCT | MSISOURCETYPE_URL, 0, value, &size); - todo_wine - { - ok(r == ERROR_BAD_CONFIGURATION, "Expected ERROR_BAD_CONFIGURATION, got %d\n", r); - } + ok(r == ERROR_BAD_CONFIGURATION, "Expected ERROR_BAD_CONFIGURATION, got %d\n", r); ok(!lstrcmpA(value, "aaa"), "Expected value to be unchanged, got %s\n", value); ok(size == MAX_PATH, "Expected MAX_PATH, got %d\n", size); @@ -858,10 +837,7 @@ static void test_MsiSourceListEnumSources(void) r = MsiSourceListEnumSourcesA(prodcode, usersid, MSIINSTALLCONTEXT_USERUNMANAGED, MSICODE_PRODUCT | MSISOURCETYPE_URL, 0, value, &size); - todo_wine - { - ok(r == ERROR_NO_MORE_ITEMS, "Expected ERROR_NO_MORE_ITEMS, got %d\n", r); - } + ok(r == ERROR_NO_MORE_ITEMS, "Expected ERROR_NO_MORE_ITEMS, got %d\n", r); ok(!lstrcmpA(value, "aaa"), "Expected value to be unchanged, got %s\n", value); ok(size == MAX_PATH, "Expected MAX_PATH, got %d\n", size); @@ -874,10 +850,7 @@ static void test_MsiSourceListEnumSources(void) r = MsiSourceListEnumSourcesA(prodcode, usersid, MSIINSTALLCONTEXT_USERUNMANAGED, MSICODE_PRODUCT | MSISOURCETYPE_URL, 0, value, &size); - todo_wine - { - ok(r == ERROR_NO_MORE_ITEMS, "Expected ERROR_NO_MORE_ITEMS, got %d\n", r); - } + ok(r == ERROR_NO_MORE_ITEMS, "Expected ERROR_NO_MORE_ITEMS, got %d\n", r); ok(!lstrcmpA(value, "aaa"), "Expected value to be unchanged, got %s\n", value); ok(size == MAX_PATH, "Expected MAX_PATH, got %d\n", size); @@ -896,12 +869,9 @@ static void test_MsiSourceListEnumSources(void) r = MsiSourceListEnumSourcesA(prodcode, usersid, MSIINSTALLCONTEXT_USERUNMANAGED, MSICODE_PRODUCT | MSISOURCETYPE_URL, 0, value, &size); - todo_wine - { - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(value, "first"), "Expected \"first\", got %s\n", value); - ok(size == 5, "Expected 5, got %d\n", size); - } + ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); + ok(!lstrcmpA(value, "first"), "Expected \"first\", got %s\n", value); + ok(size == 5, "Expected 5, got %d\n", size); /* try index 0 again */ size = MAX_PATH; @@ -909,12 +879,48 @@ static void test_MsiSourceListEnumSources(void) r = MsiSourceListEnumSourcesA(prodcode, usersid, MSIINSTALLCONTEXT_USERUNMANAGED, MSICODE_PRODUCT | MSISOURCETYPE_URL, 0, value, &size); - todo_wine - { - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(value, "first"), "Expected \"first\", got %s\n", value); - ok(size == 5, "Expected 5, got %d\n", size); - } + ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); + ok(!lstrcmpA(value, "first"), "Expected \"first\", got %s\n", value); + ok(size == 5, "Expected 5, got %d\n", size); + + /* size is exactly 5 */ + size = 5; + lstrcpyA(value, "aaa"); + r = MsiSourceListEnumSourcesA(prodcode, usersid, + MSIINSTALLCONTEXT_USERUNMANAGED, + MSICODE_PRODUCT | MSISOURCETYPE_URL, 0, value, &size); + ok(r == ERROR_MORE_DATA, "Expected ERROR_MORE_DATA, got %d\n", r); + ok(!lstrcmpA(value, "aaa"), "Expected \"aaa\", got %s\n", value); + ok(size == 5, "Expected 5, got %d\n", size); + + /* szSource is non-NULL while pcchSource is NULL */ + lstrcpyA(value, "aaa"); + r = MsiSourceListEnumSourcesA(prodcode, usersid, + MSIINSTALLCONTEXT_USERUNMANAGED, + MSICODE_PRODUCT | MSISOURCETYPE_URL, 0, value, NULL); + ok(r == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %d\n", r); + ok(!lstrcmpA(value, "aaa"), "Expected \"aaa\", got %s\n", value); + + /* try index 1 after failure */ + size = MAX_PATH; + lstrcpyA(value, "aaa"); + r = MsiSourceListEnumSourcesA(prodcode, usersid, + MSIINSTALLCONTEXT_USERUNMANAGED, + MSICODE_PRODUCT | MSISOURCETYPE_URL, 1, value, &size); + ok(r == ERROR_INVALID_PARAMETER, + "Expected ERROR_INVALID_PARAMETER, got %d\n", r); + ok(!lstrcmpA(value, "aaa"), "Expected \"aaa\", got %s\n", value); + ok(size == MAX_PATH, "Expected MAX_PATH, got %d\n", size); + + /* reset the enumeration */ + size = MAX_PATH; + lstrcpyA(value, "aaa"); + r = MsiSourceListEnumSourcesA(prodcode, usersid, + MSIINSTALLCONTEXT_USERUNMANAGED, + MSICODE_PRODUCT | MSISOURCETYPE_URL, 0, value, &size); + ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); + ok(!lstrcmpA(value, "first"), "Expected \"first\", got %s\n", value); + ok(size == 5, "Expected 5, got %d\n", size); /* try index 1 */ size = MAX_PATH; @@ -922,12 +928,20 @@ static void test_MsiSourceListEnumSources(void) r = MsiSourceListEnumSourcesA(prodcode, usersid, MSIINSTALLCONTEXT_USERUNMANAGED, MSICODE_PRODUCT | MSISOURCETYPE_URL, 1, value, &size); - todo_wine - { - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(value, "second"), "Expected \"second\", got %s\n", value); - ok(size == 6, "Expected 6, got %d\n", size); - } + ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); + ok(!lstrcmpA(value, "second"), "Expected \"second\", got %s\n", value); + ok(size == 6, "Expected 6, got %d\n", size); + + /* try index 1 again */ + size = MAX_PATH; + lstrcpyA(value, "aaa"); + r = MsiSourceListEnumSourcesA(prodcode, usersid, + MSIINSTALLCONTEXT_USERUNMANAGED, + MSICODE_PRODUCT | MSISOURCETYPE_URL, 1, value, &size); + ok(r == ERROR_INVALID_PARAMETER, + "Expected ERROR_INVALID_PARAMETER, got %d\n", r); + ok(!lstrcmpA(value, "aaa"), "Expected value to be unchanged, got %s\n", value); + ok(size == MAX_PATH, "Expected MAX_PATH, got %d\n", size); /* try index 2 */ size = MAX_PATH; @@ -935,10 +949,18 @@ static void test_MsiSourceListEnumSources(void) r = MsiSourceListEnumSourcesA(prodcode, usersid, MSIINSTALLCONTEXT_USERUNMANAGED, MSICODE_PRODUCT | MSISOURCETYPE_URL, 2, value, &size); - todo_wine - { - ok(r == ERROR_NO_MORE_ITEMS, "Expected ERROR_NO_MORE_ITEMS, got %d\n", r); - } + ok(r == ERROR_NO_MORE_ITEMS, "Expected ERROR_NO_MORE_ITEMS, got %d\n", r); + ok(!lstrcmpA(value, "aaa"), "Expected value to be unchanged, got %s\n", value); + ok(size == MAX_PATH, "Expected MAX_PATH, got %d\n", size); + + /* try index < 0 */ + size = MAX_PATH; + lstrcpyA(value, "aaa"); + r = MsiSourceListEnumSourcesA(prodcode, usersid, + MSIINSTALLCONTEXT_USERUNMANAGED, + MSICODE_PRODUCT | MSISOURCETYPE_URL, -1, value, &size); + ok(r == ERROR_INVALID_PARAMETER, + "Expected ERROR_INVALID_PARAMETER, got %d\n", r); ok(!lstrcmpA(value, "aaa"), "Expected value to be unchanged, got %s\n", value); ok(size == MAX_PATH, "Expected MAX_PATH, got %d\n", size); @@ -948,12 +970,9 @@ static void test_MsiSourceListEnumSources(void) r = MsiSourceListEnumSourcesA(prodcode, NULL, MSIINSTALLCONTEXT_USERUNMANAGED, MSICODE_PRODUCT | MSISOURCETYPE_URL, 0, value, &size); - todo_wine - { - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(value, "first"), "Expected \"first\", got %s\n", value); - ok(size == 5, "Expected 5, got %d\n", size); - } + ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); + ok(!lstrcmpA(value, "first"), "Expected \"first\", got %s\n", value); + ok(size == 5, "Expected 5, got %d\n", size); /* invalid dwOptions, must be one of MSICODE_ and MSISOURCETYPE_ */ size = MAX_PATH; @@ -961,10 +980,7 @@ static void test_MsiSourceListEnumSources(void) r = MsiSourceListEnumSourcesA(prodcode, NULL, MSIINSTALLCONTEXT_USERUNMANAGED, MSICODE_PRODUCT, 0, value, &size); - 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); ok(!lstrcmpA(value, "aaa"), "Expected value to be unchanged, got %s\n", value); ok(size == MAX_PATH, "Expected MAX_PATH, got %d\n", size); @@ -974,10 +990,7 @@ static void test_MsiSourceListEnumSources(void) r = MsiSourceListEnumSourcesA(prodcode, NULL, MSIINSTALLCONTEXT_USERUNMANAGED, MSICODE_PATCH, 0, value, &size); - 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); ok(!lstrcmpA(value, "aaa"), "Expected value to be unchanged, got %s\n", value); ok(size == MAX_PATH, "Expected MAX_PATH, got %d\n", size); @@ -988,10 +1001,7 @@ static void test_MsiSourceListEnumSources(void) MSIINSTALLCONTEXT_USERUNMANAGED, MSICODE_PRODUCT | MSICODE_PATCH | MSISOURCETYPE_URL, 0, value, &size); - todo_wine - { - ok(r == ERROR_UNKNOWN_PATCH, "Expected ERROR_SUCCESS, got %d\n", r); - } + ok(r == ERROR_UNKNOWN_PATCH, "Expected ERROR_SUCCESS, got %d\n", r); ok(!lstrcmpA(value, "aaa"), "Expected value to be unchanged, got %s\n", value); ok(size == MAX_PATH, "Expected MAX_PATH, got %d\n", size); @@ -1002,10 +1012,7 @@ static void test_MsiSourceListEnumSources(void) MSIINSTALLCONTEXT_USERUNMANAGED, MSICODE_PRODUCT | MSISOURCETYPE_NETWORK | MSISOURCETYPE_URL, 0, value, &size); - 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); ok(!lstrcmpA(value, "aaa"), "Expected value to be unchanged, got %s\n", value); ok(size == MAX_PATH, "Expected MAX_PATH, got %d\n", size); @@ -1021,10 +1028,7 @@ static void test_MsiSourceListEnumSources(void) r = MsiSourceListEnumSourcesA(prodcode, usersid, MSIINSTALLCONTEXT_USERUNMANAGED, MSICODE_PRODUCT | MSISOURCETYPE_NETWORK, 0, value, &size); - todo_wine - { - ok(r == ERROR_NO_MORE_ITEMS, "Expected ERROR_NO_MORE_ITEMS, got %d\n", r); - } + ok(r == ERROR_NO_MORE_ITEMS, "Expected ERROR_NO_MORE_ITEMS, got %d\n", r); ok(!lstrcmpA(value, "aaa"), "Expected value to be unchanged, got %s\n", value); ok(size == MAX_PATH, "Expected MAX_PATH, got %d\n", size); @@ -1037,10 +1041,7 @@ static void test_MsiSourceListEnumSources(void) r = MsiSourceListEnumSourcesA(prodcode, usersid, MSIINSTALLCONTEXT_USERUNMANAGED, MSICODE_PRODUCT | MSISOURCETYPE_NETWORK, 0, value, &size); - todo_wine - { - ok(r == ERROR_NO_MORE_ITEMS, "Expected ERROR_NO_MORE_ITEMS, got %d\n", r); - } + ok(r == ERROR_NO_MORE_ITEMS, "Expected ERROR_NO_MORE_ITEMS, got %d\n", r); ok(!lstrcmpA(value, "aaa"), "Expected value to be unchanged, got %s\n", value); ok(size == MAX_PATH, "Expected MAX_PATH, got %d\n", size); @@ -1053,12 +1054,9 @@ static void test_MsiSourceListEnumSources(void) r = MsiSourceListEnumSourcesA(prodcode, usersid, MSIINSTALLCONTEXT_USERUNMANAGED, MSICODE_PRODUCT | MSISOURCETYPE_NETWORK, 0, value, &size); - todo_wine - { - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(value, "first"), "Expected \"first\", got %s\n", value); - ok(size == 5, "Expected 5, got %d\n", size); - } + ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); + ok(!lstrcmpA(value, "first"), "Expected \"first\", got %s\n", value); + ok(size == 5, "Expected 5, got %d\n", size); RegDeleteValueA(net, "1"); RegDeleteKeyA(net, ""); @@ -1075,10 +1073,7 @@ static void test_MsiSourceListEnumSources(void) r = MsiSourceListEnumSourcesA(prodcode, usersid, MSIINSTALLCONTEXT_USERMANAGED, MSICODE_PRODUCT | MSISOURCETYPE_URL, 0, value, &size); - todo_wine - { - ok(r == ERROR_UNKNOWN_PRODUCT, "Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r); - } + ok(r == ERROR_UNKNOWN_PRODUCT, "Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r); ok(!lstrcmpA(value, "aaa"), "Expected value to be unchanged, got %s\n", value); ok(size == MAX_PATH, "Expected MAX_PATH, got %d\n", size); @@ -1096,10 +1091,7 @@ static void test_MsiSourceListEnumSources(void) r = MsiSourceListEnumSourcesA(prodcode, usersid, MSIINSTALLCONTEXT_USERMANAGED, MSICODE_PRODUCT | MSISOURCETYPE_URL, 0, value, &size); - todo_wine - { - ok(r == ERROR_BAD_CONFIGURATION, "Expected ERROR_BAD_CONFIGURATION, got %d\n", r); - } + ok(r == ERROR_BAD_CONFIGURATION, "Expected ERROR_BAD_CONFIGURATION, got %d\n", r); ok(!lstrcmpA(value, "aaa"), "Expected value to be unchanged, got %s\n", value); ok(size == MAX_PATH, "Expected MAX_PATH, got %d\n", size); @@ -1112,10 +1104,7 @@ static void test_MsiSourceListEnumSources(void) r = MsiSourceListEnumSourcesA(prodcode, usersid, MSIINSTALLCONTEXT_USERMANAGED, MSICODE_PRODUCT | MSISOURCETYPE_URL, 0, value, &size); - todo_wine - { - ok(r == ERROR_NO_MORE_ITEMS, "Expected ERROR_NO_MORE_ITEMS, got %d\n", r); - } + ok(r == ERROR_NO_MORE_ITEMS, "Expected ERROR_NO_MORE_ITEMS, got %d\n", r); ok(!lstrcmpA(value, "aaa"), "Expected value to be unchanged, got %s\n", value); ok(size == MAX_PATH, "Expected MAX_PATH, got %d\n", size); @@ -1128,10 +1117,7 @@ static void test_MsiSourceListEnumSources(void) r = MsiSourceListEnumSourcesA(prodcode, usersid, MSIINSTALLCONTEXT_USERMANAGED, MSICODE_PRODUCT | MSISOURCETYPE_URL, 0, value, &size); - todo_wine - { - ok(r == ERROR_NO_MORE_ITEMS, "Expected ERROR_NO_MORE_ITEMS, got %d\n", r); - } + ok(r == ERROR_NO_MORE_ITEMS, "Expected ERROR_NO_MORE_ITEMS, got %d\n", r); ok(!lstrcmpA(value, "aaa"), "Expected value to be unchanged, got %s\n", value); ok(size == MAX_PATH, "Expected MAX_PATH, got %d\n", size); @@ -1144,12 +1130,9 @@ static void test_MsiSourceListEnumSources(void) r = MsiSourceListEnumSourcesA(prodcode, usersid, MSIINSTALLCONTEXT_USERMANAGED, MSICODE_PRODUCT | MSISOURCETYPE_URL, 0, value, &size); - todo_wine - { - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(value, "first"), "Expected \"first\", got %s\n", value); - ok(size == 5, "Expected 5, got %d\n", size); - } + ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); + ok(!lstrcmpA(value, "first"), "Expected \"first\", got %s\n", value); + ok(size == 5, "Expected 5, got %d\n", size); /* NULL szUserSid */ size = MAX_PATH; @@ -1157,12 +1140,9 @@ static void test_MsiSourceListEnumSources(void) r = MsiSourceListEnumSourcesA(prodcode, NULL, MSIINSTALLCONTEXT_USERMANAGED, MSICODE_PRODUCT | MSISOURCETYPE_URL, 0, value, &size); - todo_wine - { - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(value, "first"), "Expected \"first\", got %s\n", value); - ok(size == 5, "Expected 5, got %d\n", size); - } + ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); + ok(!lstrcmpA(value, "first"), "Expected \"first\", got %s\n", value); + ok(size == 5, "Expected 5, got %d\n", size); RegDeleteValueA(url, "1"); RegDeleteKeyA(url, ""); @@ -1174,10 +1154,7 @@ static void test_MsiSourceListEnumSources(void) r = MsiSourceListEnumSourcesA(prodcode, usersid, MSIINSTALLCONTEXT_USERMANAGED, MSICODE_PRODUCT | MSISOURCETYPE_NETWORK, 0, value, &size); - todo_wine - { - ok(r == ERROR_NO_MORE_ITEMS, "Expected ERROR_NO_MORE_ITEMS, got %d\n", r); - } + ok(r == ERROR_NO_MORE_ITEMS, "Expected ERROR_NO_MORE_ITEMS, got %d\n", r); ok(!lstrcmpA(value, "aaa"), "Expected value to be unchanged, got %s\n", value); ok(size == MAX_PATH, "Expected MAX_PATH, got %d\n", size); @@ -1190,10 +1167,7 @@ static void test_MsiSourceListEnumSources(void) r = MsiSourceListEnumSourcesA(prodcode, usersid, MSIINSTALLCONTEXT_USERMANAGED, MSICODE_PRODUCT | MSISOURCETYPE_NETWORK, 0, value, &size); - todo_wine - { - ok(r == ERROR_NO_MORE_ITEMS, "Expected ERROR_NO_MORE_ITEMS, got %d\n", r); - } + ok(r == ERROR_NO_MORE_ITEMS, "Expected ERROR_NO_MORE_ITEMS, got %d\n", r); ok(!lstrcmpA(value, "aaa"), "Expected value to be unchanged, got %s\n", value); ok(size == MAX_PATH, "Expected MAX_PATH, got %d\n", size); @@ -1206,12 +1180,9 @@ static void test_MsiSourceListEnumSources(void) r = MsiSourceListEnumSourcesA(prodcode, usersid, MSIINSTALLCONTEXT_USERMANAGED, MSICODE_PRODUCT | MSISOURCETYPE_NETWORK, 0, value, &size); - todo_wine - { - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(value, "first"), "Expected \"first\", got %s\n", value); - ok(size == 5, "Expected 5, got %d\n", size); - } + ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); + ok(!lstrcmpA(value, "first"), "Expected \"first\", got %s\n", value); + ok(size == 5, "Expected 5, got %d\n", size); RegDeleteValueA(net, "1"); RegDeleteKeyA(net, ""); @@ -1229,10 +1200,7 @@ static void test_MsiSourceListEnumSources(void) r = MsiSourceListEnumSourcesA(prodcode, usersid, MSIINSTALLCONTEXT_MACHINE, MSICODE_PRODUCT | MSISOURCETYPE_URL, 0, value, &size); - 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); ok(!lstrcmpA(value, "aaa"), "Expected value to be unchanged, got %s\n", value); ok(size == MAX_PATH, "Expected MAX_PATH, got %d\n", size); @@ -1242,10 +1210,7 @@ static void test_MsiSourceListEnumSources(void) r = MsiSourceListEnumSourcesA(prodcode, NULL, MSIINSTALLCONTEXT_MACHINE, MSICODE_PRODUCT | MSISOURCETYPE_URL, 0, value, &size); - todo_wine - { - ok(r == ERROR_UNKNOWN_PRODUCT, "Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r); - } + ok(r == ERROR_UNKNOWN_PRODUCT, "Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r); ok(!lstrcmpA(value, "aaa"), "Expected value to be unchanged, got %s\n", value); ok(size == MAX_PATH, "Expected MAX_PATH, got %d\n", size); @@ -1261,10 +1226,7 @@ static void test_MsiSourceListEnumSources(void) r = MsiSourceListEnumSourcesA(prodcode, NULL, MSIINSTALLCONTEXT_MACHINE, MSICODE_PRODUCT | MSISOURCETYPE_URL, 0, value, &size); - todo_wine - { - ok(r == ERROR_BAD_CONFIGURATION, "Expected ERROR_BAD_CONFIGURATION, got %d\n", r); - } + ok(r == ERROR_BAD_CONFIGURATION, "Expected ERROR_BAD_CONFIGURATION, got %d\n", r); ok(!lstrcmpA(value, "aaa"), "Expected value to be unchanged, got %s\n", value); ok(size == MAX_PATH, "Expected MAX_PATH, got %d\n", size); @@ -1277,10 +1239,7 @@ static void test_MsiSourceListEnumSources(void) r = MsiSourceListEnumSourcesA(prodcode, NULL, MSIINSTALLCONTEXT_MACHINE, MSICODE_PRODUCT | MSISOURCETYPE_URL, 0, value, &size); - todo_wine - { - ok(r == ERROR_NO_MORE_ITEMS, "Expected ERROR_NO_MORE_ITEMS, got %d\n", r); - } + ok(r == ERROR_NO_MORE_ITEMS, "Expected ERROR_NO_MORE_ITEMS, got %d\n", r); ok(!lstrcmpA(value, "aaa"), "Expected value to be unchanged, got %s\n", value); ok(size == MAX_PATH, "Expected MAX_PATH, got %d\n", size); @@ -1293,10 +1252,7 @@ static void test_MsiSourceListEnumSources(void) r = MsiSourceListEnumSourcesA(prodcode, NULL, MSIINSTALLCONTEXT_MACHINE, MSICODE_PRODUCT | MSISOURCETYPE_URL, 0, value, &size); - todo_wine - { - ok(r == ERROR_NO_MORE_ITEMS, "Expected ERROR_NO_MORE_ITEMS, got %d\n", r); - } + ok(r == ERROR_NO_MORE_ITEMS, "Expected ERROR_NO_MORE_ITEMS, got %d\n", r); ok(!lstrcmpA(value, "aaa"), "Expected value to be unchanged, got %s\n", value); ok(size == MAX_PATH, "Expected MAX_PATH, got %d\n", size); @@ -1309,12 +1265,9 @@ static void test_MsiSourceListEnumSources(void) r = MsiSourceListEnumSourcesA(prodcode, NULL, MSIINSTALLCONTEXT_MACHINE, MSICODE_PRODUCT | MSISOURCETYPE_URL, 0, value, &size); - todo_wine - { - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(value, "first"), "Expected \"first\", got %s\n", value); - ok(size == 5, "Expected 5, got %d\n", size); - } + ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); + ok(!lstrcmpA(value, "first"), "Expected \"first\", got %s\n", value); + ok(size == 5, "Expected 5, got %d\n", size); /* NULL szUserSid */ size = MAX_PATH; @@ -1322,12 +1275,9 @@ static void test_MsiSourceListEnumSources(void) r = MsiSourceListEnumSourcesA(prodcode, NULL, MSIINSTALLCONTEXT_MACHINE, MSICODE_PRODUCT | MSISOURCETYPE_URL, 0, value, &size); - todo_wine - { - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(value, "first"), "Expected \"first\", got %s\n", value); - ok(size == 5, "Expected 5, got %d\n", size); - } + ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); + ok(!lstrcmpA(value, "first"), "Expected \"first\", got %s\n", value); + ok(size == 5, "Expected 5, got %d\n", size); RegDeleteValueA(url, "1"); RegDeleteKeyA(url, ""); @@ -1339,10 +1289,7 @@ static void test_MsiSourceListEnumSources(void) r = MsiSourceListEnumSourcesA(prodcode, NULL, MSIINSTALLCONTEXT_MACHINE, MSICODE_PRODUCT | MSISOURCETYPE_NETWORK, 0, value, &size); - todo_wine - { - ok(r == ERROR_NO_MORE_ITEMS, "Expected ERROR_NO_MORE_ITEMS, got %d\n", r); - } + ok(r == ERROR_NO_MORE_ITEMS, "Expected ERROR_NO_MORE_ITEMS, got %d\n", r); ok(!lstrcmpA(value, "aaa"), "Expected value to be unchanged, got %s\n", value); ok(size == MAX_PATH, "Expected MAX_PATH, got %d\n", size); @@ -1355,10 +1302,7 @@ static void test_MsiSourceListEnumSources(void) r = MsiSourceListEnumSourcesA(prodcode, NULL, MSIINSTALLCONTEXT_MACHINE, MSICODE_PRODUCT | MSISOURCETYPE_NETWORK, 0, value, &size); - todo_wine - { - ok(r == ERROR_NO_MORE_ITEMS, "Expected ERROR_NO_MORE_ITEMS, got %d\n", r); - } + ok(r == ERROR_NO_MORE_ITEMS, "Expected ERROR_NO_MORE_ITEMS, got %d\n", r); ok(!lstrcmpA(value, "aaa"), "Expected value to be unchanged, got %s\n", value); ok(size == MAX_PATH, "Expected MAX_PATH, got %d\n", size); @@ -1371,12 +1315,9 @@ static void test_MsiSourceListEnumSources(void) r = MsiSourceListEnumSourcesA(prodcode, NULL, MSIINSTALLCONTEXT_MACHINE, MSICODE_PRODUCT | MSISOURCETYPE_NETWORK, 0, value, &size); - todo_wine - { - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(value, "first"), "Expected \"first\", got %s\n", value); - ok(size == 5, "Expected 5, got %d\n", size); - } + ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); + ok(!lstrcmpA(value, "first"), "Expected \"first\", got %s\n", value); + ok(size == 5, "Expected 5, got %d\n", size); RegDeleteValueA(net, "1"); RegDeleteKeyA(net, "");