2011-06-24 01:43:52 +04:00
|
|
|
|
2011-07-28 18:26:00 +04:00
|
|
|
/*
|
|
|
|
* Copyright 2011 Google Inc.
|
|
|
|
*
|
|
|
|
* Use of this source code is governed by a BSD-style license that can be
|
|
|
|
* found in the LICENSE file.
|
2011-06-24 01:43:52 +04:00
|
|
|
*/
|
|
|
|
|
2011-07-28 18:26:00 +04:00
|
|
|
|
2011-06-24 01:43:52 +04:00
|
|
|
#ifndef SkAutoCo_DEFINED
|
|
|
|
#define SkAutoCo_DEFINED
|
|
|
|
|
|
|
|
#define WIN32_LEAN_AND_MEAN
|
|
|
|
#include <Windows.h>
|
|
|
|
#include "SkTemplates.h"
|
|
|
|
|
|
|
|
/**
|
|
|
|
* An instance of this class initializes COM on creation
|
|
|
|
* and closes the COM library on destruction.
|
|
|
|
*/
|
2011-09-16 19:37:20 +04:00
|
|
|
class SkAutoCoInitialize : SkNoncopyable {
|
2011-06-24 01:43:52 +04:00
|
|
|
private:
|
|
|
|
HRESULT fHR;
|
|
|
|
public:
|
2011-09-16 19:37:20 +04:00
|
|
|
SkAutoCoInitialize();
|
|
|
|
~SkAutoCoInitialize();
|
|
|
|
bool succeeded();
|
2011-06-24 01:43:52 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|