I have a USB device,When it is connected to my computer, the USB device becomes a COM PORT.

How do I do the following:
(1) I need to know if the device is presently plugged into my computer yes or no
(2) The device, when plugged into my computer becomes a "COM<some number>"
On my computer it becomes COM9, on somebody elses computer it becomes a different random COM<number>.

I need to determine the exact name of the COMPORT for my special USB device.and the COM port number for this device?


I know the Device id and Product ID.