I have found this code to watch for a CD to be inserted/ejected using C#. I’m curious if this can be efficiently tuned into a background process/timer function without any significant loss of performance.
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.
Instead of using background processes or timers, I would advise you to use the triggers provided by
ManagementEventWatcher.You can find an example implementation here: http://www.codeproject.com/Tips/295008/How-to-Detect-Insertion-of-a-CD-ROM