Serial Port Monitoring Control - ActiveX Component Library for RS232 Data Monitoring, API for Software Developers
Download Serial Port Monitoring Control Hide this button

How To Initialize the SPMC Library

This section describes the steps you need to carry in order to successfully initialize the SPMC library.

Native Environment

  1. Use the #import directive to bring definitions into the scope:

    #import "full_path_to_hhdspmc.dll"
    

    or

    #import "progid:hhdspmc.SerialMonitor.1.2"
    

    or

    #import "libid:DD962786-3734-4BE3-B375-5E6F3FD37E37" version("1.2")
    
  2. Declare the pointer to the ISerialMonitor interface.

    ISerialMonitorPtr pSerialMonitor;
    
  3. Create the instance of the SerialMonitor object.

    pSerialMonitor.CoCreateInstance(__uuidof(SerialMonitor));
    

    Remember that you cannot create more than one SerialMonitor object in single process. Although, you can have as many Monitor objects as you need.

Managed Environment

Use your language-provided tools to add the reference to the Serial Port Monitoring Control library into your project.