xentara-utils v2.0.4
The Xentara Utility Library
Loading...
Searching...
No Matches
xentara::utils::windows::com::ThreadEnvironment Class Referencefinal

A class that initializes the COM interface. More...

#include <xentara/utils/windows/com/ThreadEnvironment.hpp>

Public Types

enum class  ConcurrencyModel { ApartmentThreaded , MultiThreaded }
 COM concurrency models. More...
 

Public Member Functions

 ThreadEnvironment (ConcurrencyModel concurrencyModel)
 Constructor.
 
 ~ThreadEnvironment ()
 Destructor.
 

Detailed Description

A class that initializes the COM interface.

This class prepares the current thread for use with the Component Object Model (COM).

Member Enumeration Documentation

◆ ConcurrencyModel

COM concurrency models.

See also
Processes, Threads, and Apartments in the Windows COM documentation for details.
Enumerator
ApartmentThreaded 

The thread receives it's own single-threaded apartment.

MultiThreaded 

The thread is placed in the common multithreaded apartment.

Constructor & Destructor Documentation

◆ ThreadEnvironment()

xentara::utils::windows::com::ThreadEnvironment::ThreadEnvironment ( ConcurrencyModel  concurrencyModel)

Constructor.

Parameters
concurrencyModelThe COM concurrency model.
Exceptions
std::runtime_errorThe thread environment could not be initialized

◆ ~ThreadEnvironment()

xentara::utils::windows::com::ThreadEnvironment::~ThreadEnvironment ( )

Destructor.