TSDuck Version 3.32-2780 (TSDuck - The MPEG Transport Stream Toolkit)
ts::COM Class Reference

A class to encapsulate the initialization of Windows COM. More...

Public Member Functions

 COM (Report &report=(*(static_cast< ts::Report * >(ts::CerrReport::Instance()))))
 Constructor. More...
 ~COM ()
 Destructor. More...
bool isInitialized () const
 Check if initialization was successful. More...
void uninitialize ()
 Perform an early COM uninitialize (before destructor).

Detailed Description

A class to encapsulate the initialization of Windows COM.

On Windows, the applications which use the Common Object Model (COM) need to initialize the COM framework before using COM objects and correctly uninitialize COM when they are finished. The COM class does that as automatically as possible, regardless of the operating system.

Each instance of COM initializes the COM frameword in the constructor and performs the corresponding uninitialize in the destructor.

Constructor & Destructor Documentation

◆ COM()

ts::COM::COM ( Report report = (*(static_cast< ts::Report * >(ts::CerrReport::Instance()))))


It initializes COM. The equivalent uninitialize will be performed in the destructor.

[in,out]reportWhere to report error messages. Use the standard error by default.

◆ ~COM()

ts::COM::~COM ( )


It uninitializes COM, unless uninitialize() was already explicitly invoked.

Member Function Documentation

◆ isInitialized()

bool ts::COM::isInitialized ( ) const

Check if initialization was successful.

True if initialization was successful and uninitialize() was not called.

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