bungeman@google.com | 9df621d | 2011-06-23 21:43:52 +0000 | [diff] [blame] | 1 | /* |
epoger@google.com | ec3ed6a | 2011-07-28 14:26:00 +0000 | [diff] [blame] | 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. |
bungeman@google.com | 9df621d | 2011-06-23 21:43:52 +0000 | [diff] [blame] | 6 | */ |
| 7 | |
bungeman@google.com | 9df621d | 2011-06-23 21:43:52 +0000 | [diff] [blame] | 8 | #ifndef SkAutoCo_DEFINED |
| 9 | #define SkAutoCo_DEFINED |
| 10 | |
bungeman | f3c15b7 | 2015-08-19 11:56:48 -0700 | [diff] [blame] | 11 | #include "SkTypes.h" |
bungeman@google.com | 9df621d | 2011-06-23 21:43:52 +0000 | [diff] [blame] | 12 | |
| 13 | /** |
| 14 | * An instance of this class initializes COM on creation |
| 15 | * and closes the COM library on destruction. |
| 16 | */ |
bungeman@google.com | 2e2f3f5 | 2011-09-16 15:37:20 +0000 | [diff] [blame] | 17 | class SkAutoCoInitialize : SkNoncopyable { |
bungeman@google.com | 9df621d | 2011-06-23 21:43:52 +0000 | [diff] [blame] | 18 | private: |
| 19 | HRESULT fHR; |
| 20 | public: |
bungeman@google.com | 2e2f3f5 | 2011-09-16 15:37:20 +0000 | [diff] [blame] | 21 | SkAutoCoInitialize(); |
| 22 | ~SkAutoCoInitialize(); |
| 23 | bool succeeded(); |
bungeman@google.com | 9df621d | 2011-06-23 21:43:52 +0000 | [diff] [blame] | 24 | }; |
| 25 | |
| 26 | #endif |