This section describes the steps you need to carry in order to retrieve the properties of the serial device.
Obtain the IDevice pointer for the device in question.
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;