This is not something you can reliably detect. If it was a USB microphone, then the device itself would be removed, but many soundcards will not surface any notification to Windows that something has been connected or disconnected from one of their inputs.
↧