This section describes the steps you need to carry in order to create a monitor object.
SerialMonitor object, as described in the this tutorial.
Call the CreateMonitor method to create a monitor object and receive the IMonitoring interface.
IMonitoringPtr pMonitor = pSerialMonitor->CreateMonitor();
Monitor monitor = sm.CreateMonitor();
You can create as many monitor objects as you need. Each Monitor object can be attached to one serial device at a time and can have as many native listeners or event handlers attached, as you need.