Chromium Code Reviews| Index: base/win/atl_module.cc |
| =================================================================== |
| --- base/win/atl_module.cc (revision 0) |
| +++ base/win/atl_module.cc (revision 0) |
| @@ -0,0 +1,24 @@ |
| +// Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#include "base/win/atl_module.h" |
| + |
| +#include <atlbase.h> |
| +#include <atlcom.h> |
| + |
| +namespace base { |
| +namespace win { |
| + |
| +void CreateATLModuleIfNeeded() { |
| + if (_pAtlModule == NULL) { |
| + static CComModule module; |
| + _pAtlModule = &module; |
| + |
| + // Make sure COM is initialized for this thread; it's safe to call twice. |
|
cpu_(ooo_6.6-7.5)
2011/11/04 17:25:34
not really. It is safe it is the same exact COM mo
|
| + ::CoInitialize(NULL); |
| + } |
| +} |
| + |
| +} // namespace win |
| +} // namespace base |