wxExtend/src/comutils.cpp
Simon Rozman 3c2e59b56c Switch to SPDX license notice
Signed-off-by: Simon Rozman <simon@rozman.si>
2021-11-22 12:59:54 +01:00

28 lines
640 B
C++
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/*
SPDX-License-Identifier: GPL-3.0-or-later
Copyright © 2015-2021 Amebis
Copyright © 2016 GÉANT
*/
#include "pch.h"
//////////////////////////////////////////////////////////////////////////
// wxCoInitializer
//////////////////////////////////////////////////////////////////////////
wxCoInitializer::wxCoInitializer(DWORD dwCoInit)
{
HRESULT hr = ::CoInitializeEx(NULL, dwCoInit);
m_initialized = SUCCEEDED(hr);
m_ok = SUCCEEDED(hr) || hr == RPC_E_CHANGED_MODE;
}
wxCoInitializer::~wxCoInitializer()
{
if (m_initialized)
::CoUninitialize();
}