Module: wine Branch: master Commit: dd1ca6ca5ef0bee4c69b7016d52d6e7a76ff6722 URL: http://source.winehq.org/git/wine.git/?a=commit;h=dd1ca6ca5ef0bee4c69b7016d5...
Author: Hans Leidekker hans@meelstraat.net Date: Thu Sep 10 10:10:33 2009 +0200
msi: Ignore CoInitialize failure in ACTION_CreateShortcuts.
---
dlls/msi/action.c | 8 ++------ dlls/msi/tests/install.c | 2 +- 2 files changed, 3 insertions(+), 7 deletions(-)
diff --git a/dlls/msi/action.c b/dlls/msi/action.c index 881c4a2..6bff87a 100644 --- a/dlls/msi/action.c +++ b/dlls/msi/action.c @@ -3387,16 +3387,12 @@ static UINT ACTION_CreateShortcuts(MSIPACKAGE *package) return ERROR_SUCCESS;
res = CoInitialize( NULL ); - if (FAILED (res)) - { - ERR("CoInitialize failed\n"); - return ERROR_FUNCTION_FAILED; - }
rc = MSI_IterateRecords(view, NULL, ITERATE_CreateShortcuts, package); msiobj_release(&view->hdr);
- CoUninitialize(); + if (SUCCEEDED(res)) + CoUninitialize();
return rc; } diff --git a/dlls/msi/tests/install.c b/dlls/msi/tests/install.c index 9d1237a..b78e3dc 100644 --- a/dlls/msi/tests/install.c +++ b/dlls/msi/tests/install.c @@ -6212,7 +6212,7 @@ static void test_shortcut(void) ok(SUCCEEDED(hr), "CoInitialize failed 0x%08x\n", hr);
r = MsiInstallProductA(msifile, NULL); - todo_wine ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r); + ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r);
CoUninitialize();