Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(8381)

Unified Diff: chrome/installer/util/wmi.cc

Issue 2894483002: Migrate from ScopedComPtr::CreateInstance() to CoCreateInstance in chrome/... (Closed)
Patch Set: Fix Header Include Location Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/installer/util/shell_util.cc ('k') | chrome/utility/importer/ie_importer_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/installer/util/wmi.cc
diff --git a/chrome/installer/util/wmi.cc b/chrome/installer/util/wmi.cc
index e381223db98b8df5352b9d804627472ba1f9240e..dc2504cb01676dd13ecff06f69f083e92d73fa76 100644
--- a/chrome/installer/util/wmi.cc
+++ b/chrome/installer/util/wmi.cc
@@ -5,6 +5,7 @@
#include "chrome/installer/util/wmi.h"
#include <windows.h>
+#include <objbase.h>
#include <stdint.h>
#include "base/win/scoped_bstr.h"
@@ -18,8 +19,8 @@ namespace installer {
bool WMI::CreateLocalConnection(bool set_blanket,
IWbemServices** wmi_services) {
base::win::ScopedComPtr<IWbemLocator> wmi_locator;
- HRESULT hr = wmi_locator.CreateInstance(CLSID_WbemLocator, NULL,
- CLSCTX_INPROC_SERVER);
+ HRESULT hr = ::CoCreateInstance(CLSID_WbemLocator, NULL, CLSCTX_INPROC_SERVER,
+ IID_PPV_ARGS(&wmi_locator));
if (FAILED(hr))
return false;
« no previous file with comments | « chrome/installer/util/shell_util.cc ('k') | chrome/utility/importer/ie_importer_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698