TSDuck v3.40-4001
MPEG Transport Stream Toolkit
Loading...
Searching...
No Matches
ts::COM Class Reference

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

#include <tsCOM.h>

Public Member Functions

 COM (Report &report=(ts::CerrReport::Instance()))
 Constructor.
 
 ~COM ()
 Destructor.
 
bool isInitialized () const
 Check if initialization was successful.
 
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 = (ts::CerrReport::Instance()))

Constructor.

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

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

◆ ~COM()

ts::COM::~COM ( )

Destructor.

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

Member Function Documentation

◆ isInitialized()

bool ts::COM::isInitialized ( ) const
inline

Check if initialization was successful.

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

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