How can I detect an active connection in Windows NT?