Unfortunately if you've got to ask how to set about it then the problem is too difficult for you.
You've got to poll the USB devices, then you've got to interact with the Windows kernel to put a...