Status of Com PORT (not TAPI)

How to find it? (for example, how to find disconnect?)

regards