RunicVTT Open Source Virtual Tabletop for TTRPG using P2P
Loading...
Searching...
No Matches
AssetIO::ComInit Struct Reference

#include <AssetIO.h>

Collaboration diagram for AssetIO::ComInit:

Public Member Functions

 ComInit ()
 
 ~ComInit ()
 
bool ok () const
 

Public Attributes

HRESULT hr {E_FAIL}
 

Detailed Description

Definition at line 37 of file AssetIO.h.

Constructor & Destructor Documentation

◆ ComInit()

AssetIO::ComInit::ComInit ( )
inline

Definition at line 40 of file AssetIO.h.

41 {
42 hr = CoInitializeEx(nullptr, COINIT_APARTMENTTHREADED | COINIT_DISABLE_OLE1DDE);
43 }

◆ ~ComInit()

AssetIO::ComInit::~ComInit ( )
inline

Definition at line 44 of file AssetIO.h.

45 {
46 if (SUCCEEDED(hr))
47 CoUninitialize();
48 }

Member Function Documentation

◆ ok()

bool AssetIO::ComInit::ok ( ) const
inline

Definition at line 49 of file AssetIO.h.

50 {
51 return SUCCEEDED(hr);
52 }
Here is the caller graph for this function:

Member Data Documentation

◆ hr

HRESULT AssetIO::ComInit::hr {E_FAIL}

Definition at line 39 of file AssetIO.h.

39{E_FAIL};

The documentation for this struct was generated from the following file: