Groups | Blog | Home
all groups > dotnet sdk > july 2005 >

dotnet sdk : Can I listen for WM_DEVICECHANGE within a "C# service"?


Tony
7/17/2005 10:09:02 AM
Hi,

I want a managed code Windows Service to respond to a CD being inserted. Any
pointers as to how best to approach this would be gratefully received.

Tony
7/17/2005 12:02:02 PM
.... I think I can use WMI to do this. Seems an excellent article on it in
MSDN Magazine ...
http://msdn.microsoft.com/msdnmag/issues/02/05/WMIMan/default.aspx

.... I thought hooking Windows messages might be bad practice and/or
introduce a security loophole, so WMI looks great!

Would be interested to know if there is a smarter way of doing it though.

Tony.
[PS So impatient I usually answer my own questions.]

[quoted text, click to view]
AddThis Social Bookmark Button