1/*
2 * Copyright 2011 Google Inc.
3 *
4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file.
6 */
7
8#ifndef SkAutoCo_DEFINED
9#define SkAutoCo_DEFINED
10
11#include "SkTypes.h"
12
13#ifdef SK_BUILD_FOR_WIN
14
15#include "SkLeanWindows.h"
16
17/**
18 * An instance of this class initializes COM on creation
19 * and closes the COM library on destruction.
20 */
21class SkAutoCoInitialize : SkNoncopyable {
22private:
23    HRESULT fHR;
24public:
25    SkAutoCoInitialize();
26    ~SkAutoCoInitialize();
27    bool succeeded();
28};
29
30#endif  // SK_BUILD_FOR_WIN
31#endif  // SkAutoCo_DEFINED
32