i wrote a c++ code to communicate with usb gsm modem using com ports. now i want to be informed immediately when the modem is pulled out or disconnected somehow. can i do this by using event handling or any other way? if the answer is yes then I'll be very grateful if someone tell me the way. thanks in advance :).
thanks Arefin
Yes. The USB standard is quite definite about the fact that unplugging of devices is allowed and must be managed by the OS. Since you haven't told us which OS, we can't point you to the precise function. In general, you'd look at the device management functions.