Index: chrome/browser/shell_integration_win.cc |
diff --git a/chrome/browser/shell_integration_win.cc b/chrome/browser/shell_integration_win.cc |
index 3b6a0ba7c1ba678a7cbe85a1e380e62e9fe3a83c..06dbc42d025ac612636b61e19ce233ebdeec3f5f 100644 |
--- a/chrome/browser/shell_integration_win.cc |
+++ b/chrome/browser/shell_integration_win.cc |
@@ -5,6 +5,7 @@ |
#include "chrome/browser/shell_integration_win.h" |
#include <windows.h> |
+#include <objbase.h> |
#include <shlwapi.h> |
#include <shobjidl.h> |
#include <propkey.h> // Needs to come after shobjidl.h. |
@@ -782,8 +783,8 @@ int MigrateShortcutsInPathInternal(const base::FilePath& chrome_exe, |
// Load the shortcut. |
base::win::ScopedComPtr<IShellLink> shell_link; |
base::win::ScopedComPtr<IPersistFile> persist_file; |
- if (FAILED(shell_link.CreateInstance(CLSID_ShellLink, NULL, |
- CLSCTX_INPROC_SERVER)) || |
+ if (FAILED(::CoCreateInstance(CLSID_ShellLink, NULL, CLSCTX_INPROC_SERVER, |
+ IID_PPV_ARGS(&shell_link))) || |
FAILED(shell_link.CopyTo(persist_file.GetAddressOf())) || |
FAILED(persist_file->Load(shortcut.value().c_str(), STGM_READ))) { |
DLOG(WARNING) << "Failed loading shortcut at " << shortcut.value(); |