winstd::com_initializer Class Reference
COM object management

Context scope automatic COM (un)initialization. More...

`#include <WinStd/COM.h>`

## Public Member Functions

| com_initializer (LPVOID pvReserved) noexcept
| Initializes the COM library on the current thread and identifies the concurrency model as single-thread apartment (STA). More...
| com_initializer (LPVOID pvReserved, DWORD dwCoInit) noexcept
| Initializes the COM library for use by the calling thread, sets the thread's concurrency model, and creates a new apartment for the thread if one is required. More...
virtual | ~com_initializer ()
| Uninitializes COM. More...
HRESULT | status () const noexcept
| Return result of `CoInitialize()` call. More...

## Protected Attributes

HRESULT | m_result
| Result of CoInitialize call.

## Detailed Description

Context scope automatic COM (un)initialization.

## Constructor & Destructor Documentation

## com_initializer() [1/2]

winstd::com_initializer::com_initializer | ( | LPVOID | pvReserved | ) |

inlinenoexcept

Initializes the COM library on the current thread and identifies the concurrency model as single-thread apartment (STA).

See also
  CoInitialize function

## com_initializer() [2/2]

winstd::com_initializer::com_initializer | ( | LPVOID | pvReserved,
|  | DWORD | dwCoInit
| ) |  |

inlinenoexcept

Initializes the COM library for use by the calling thread, sets the thread's concurrency model, and creates a new apartment for the thread if one is required.

See also
  CoInitializeEx function

## ~com_initializer()

virtual winstd::com_initializer::~com_initializer | ( |  | ) |

inlinevirtual

Uninitializes COM.

See also
  CoUninitialize function

## Member Function Documentation

## status()

HRESULT winstd::com_initializer::status | ( |  | ) | const

inlinenoexcept

Return result of `CoInitialize()` call.

See also
  CoInitialize function

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

- include/WinStd/COM.h