![]() |
TSDuck v3.46-4930
MPEG Transport Stream Toolkit
|
#include <tsCOM.h>
Public Member Functions | |
| COM (Report &report=(ts::CerrReport::Instance())) | |
| ~COM () | |
| bool | isInitialized () const |
| void | uninitialize () |
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.
| void ts::COM::uninitialize | ( | ) |
Perform an early COM uninitialize (before destructor).