summaryrefslogtreecommitdiffstats
path: root/ui/base/win/scoped_ole_initializer.cc
blob: 8dab498eb0f713a28a67c575ee97ed1f6acaace0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
// Copyright (c) 2012 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 "ui/base/win/scoped_ole_initializer.h"

#include <ole2.h>

#include "base/logging.h"

namespace ui {

ScopedOleInitializer::ScopedOleInitializer() {
  HRESULT result = OleInitialize(NULL);
  DCHECK(SUCCEEDED(result));
}

ScopedOleInitializer::~ScopedOleInitializer() {
  OleUninitialize();
}

}  // namespace ui