TSDuck v3.40-4001
MPEG Transport Stream Toolkit
|
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). | |
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.
ts::COM::COM | ( | Report & | report = (ts::CerrReport::Instance()) | ) |
Constructor.
It initializes COM. The equivalent uninitialize will be performed in the destructor.
[in,out] | report | Where to report error messages. Use the standard error by default. |
ts::COM::~COM | ( | ) |
Destructor.
It uninitializes COM, unless uninitialize() was already explicitly invoked.
|
inline |
Check if initialization was successful.