I want to invoke a function only if the device is connected to the system. So my problem is how can I check whether the device is connected or not through USB before invoking the function. Can anyone help…thanks in advance.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I think you should be able to find out by using the NetworkInterfaceInfo class:
Note: If you disconnect your computer from the internet, I think this is no longer valid.. But as long as you’re connected to a computer that is connected to a network and Zune is running, this should work (not tested)