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 Retrieve the Serial Device Properties

This section describes the steps you need to carry in order to retrieve the properties of the serial device.

  1. Obtain the IDevice pointer for the device in question.

  2. Take the values of the Name, ConnectionString, Icon, Port, Present and Type properties.

    _bstr_t Name, ConnectionString, Port;
    VARIANT_BOOL Present;
    DeviceType Type;
    HICON hIcon;
    
    Name = pDevice->Name;
    ConnectionString = pDevice->ConnectionString;
    Port = pDevice->Port;
    Present = pDevice->Present;
    Type = pDevice->Type;
    hIcon = pDevice->Icon;
    
    string Name = device.Name;
    string ConnectionString = device.ConnectionString;
    string Port = device.Port;
    bool Present = device.Present;
    DeviceType type = device.Type;