There is no reliable way of determining Serial Connection status at any given time.
The standard approach is for each side to turn DTR to high, so whoever you're connected to sees DSR and thus knows something is on the other end. You haven't specifically stated the exact type of connection, but since you're having these issues, I'm going to assume for the moment that it is DTE/DTE and requires a null modem connection.
What makes this worse is that the problem may be with the cable itself and not with the software or the OS.
See this page for more info, but there is more than one pinout for a null modem cables.
The minimum wiring required inside the null modem cable looks like this:

This is what's called a "No-Handshake null modem cable". You can see that the DTR and DSR pins (pin 6 and 4) go nowhere. DSR pin states will not change when something is plugged in using this cable.
Then there's this:

This is a "Loop-Back handshake cable". You can see here that DTR and DSR (pins 6 and 4) are bridged to eachother at each connector and don't go along the length of the cable. This means that if you set your DTR high, you will see a DSR - your own. This tells you that there is a serial cable connected to your port, but the other end of that cable doesn't necessarily go anywhere. You could chop the cable in half and stick it up your nose and you'd still see what the software is telling you is a valid connection.
The better solution is a cable that looks like this:

or like this

This is a partial or full handshake cable. You can see that each side's pin 4 goes into the other's pin6. So each side can set DTR high, and see the other party's DSR. This is the only case where you can accurately determine if the cable is actually connected to a device; and even then only if each side agrees set DTR. Unless you control both sides of the communication, this is going to be hit or miss.
That's the best you can do without sending data down the wire and waiting for a valid reply.