The hotplug detection for DVI and HDMI works - as already mentioned in this forum - over a "hot plug detect" wire in the cable. If this wire wasn't there, windows would not be able to detect wether the TV/monitor is pluged/unpluged.
That approach wont work with all canfigurations. I tested it a while ago with dev PC + GT430 + Onkyo amp + monitor. It will work on some cases, but on some cases it causes complete loss of video signal on monitor. Good for some setups but not a solution for all setups. In the other hand same setup works perfectly with the fail safe resolution changed to 1920x1080.