Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
atl_module.h
Go to the documentation of this file.
1// Copyright (c) 2011 The Chromium Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#ifndef UI_BASE_WIN_ATL_MODULE_H_
6#define UI_BASE_WIN_ATL_MODULE_H_
7
8namespace ui {
9namespace win {
10
11// Ensure that we have exactly one ATL module registered. It's safe to
12// call this more than once. ATL functions will crash if there's no
13// ATL module registered, or if you try to register two of them, so
14// dynamically registering one if needed makes it much easier for us
15// to support different build configurations like multi-dll without
16// worrying about which side of a module boundary each ATL module object
17// belongs on.
18//
19// This function must be implemented in this header file rather than a
20// source file so that it's inlined into the module where it's included,
21// rather than in the "ui" module.
23 if (_pAtlModule == NULL) {
24 // This creates the module and automatically updates _pAtlModule.
25 new CComModule;
26 }
27}
28
29} // namespace win
30} // namespace ui
31
32#endif // UI_BASE_WIN_ATL_MODULE_H_
void CreateATLModuleIfNeeded()
Definition atl_module.h:22