Index: chrome/browser/media_galleries/fileapi/av_scanning_file_validator.cc |
diff --git a/chrome/browser/media_galleries/fileapi/av_scanning_file_validator.cc b/chrome/browser/media_galleries/fileapi/av_scanning_file_validator.cc |
index 5e6ec1feec8dff33acf72dbd9df495592e81aefc..73c34930955004a9b2e259e6bbcf4a45fef147d4 100644 |
--- a/chrome/browser/media_galleries/fileapi/av_scanning_file_validator.cc |
+++ b/chrome/browser/media_galleries/fileapi/av_scanning_file_validator.cc |
@@ -6,6 +6,7 @@ |
#if defined(OS_WIN) |
#include <windows.h> |
+#include <objbase.h> |
#include <shlobj.h> |
#endif |
@@ -31,7 +32,8 @@ base::File::Error ScanFile(const base::FilePath& dest_platform_path) { |
DCHECK_CURRENTLY_ON(BrowserThread::FILE); |
base::win::ScopedComPtr<IAttachmentExecute> attachment_services; |
- HRESULT hr = attachment_services.CreateInstance(CLSID_AttachmentServices); |
+ HRESULT hr = ::CoCreateInstance(CLSID_AttachmentServices, nullptr, CLSCTX_ALL, |
+ IID_PPV_ARGS(&attachment_services)); |
if (FAILED(hr)) { |
// The thread must have COM initialized. |