mirror of
https://github.com/Jous99/F4MP.git
synced 2026-01-12 14:00:53 +01:00
16 lines
313 B
C++
16 lines
313 B
C++
#pragma once
|
|
|
|
#include <wrl.h>
|
|
|
|
// short alias
|
|
template <typename T> using ComPtr = Microsoft::WRL::ComPtr<T>;
|
|
|
|
struct ComScope
|
|
{
|
|
ComScope()
|
|
{
|
|
HRESULT hr = CoInitializeEx(nullptr, COINIT_APARTMENTTHREADED | COINIT_DISABLE_OLE1DDE);
|
|
(void)hr;
|
|
}
|
|
~ComScope() { CoUninitialize(); }
|
|
};
|