By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
432,474 Members | 939 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 432,474 IT Pros & Developers. It's quick & easy.

Detect CD Insert from Windows Service

P: n/a
I am trying to detect when a CD is inserted from a windows service. I
have went through the route of creating a hiden window and trying to
use the WndProc to detect the event; although the window does not seem
to be recieving the events that I need. I have also tried registering
the WM_SHNOTIFY event with my specific window and still do not recieve
the event.

Is there another method for recieving the CD insert event from within
a winows service?

Thanks.

Jul 10 '07 #1
Share this Question
Share on Google+
2 Replies


P: n/a
If you want to get messages sent to the window, then I think you have to
set the checkbox on the service that allows it to interact with the desktop
(since you are trying to get it through a windows message).

You might want to consider an application that runs while the user is
logged in that sends a message to your service when the CD is inserted.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com
<ar********@gmail.comwrote in message
news:11*********************@p39g2000hse.googlegro ups.com...
>I am trying to detect when a CD is inserted from a windows service. I
have went through the route of creating a hiden window and trying to
use the WndProc to detect the event; although the window does not seem
to be recieving the events that I need. I have also tried registering
the WM_SHNOTIFY event with my specific window and still do not recieve
the event.

Is there another method for recieving the CD insert event from within
a winows service?

Thanks.
Jul 10 '07 #2

P: n/a
I have tried checking that box and the window still does not recieve
the messages; I suspect they may be filtered out by the service.

thanks.

On Jul 10, 11:00 am, "Nicholas Paldino [.NET/C# MVP]"
<m...@spam.guard.caspershouse.comwrote:
If you want to get messages sent to the window, then I think you have to
set the checkbox on the service that allows it to interact with the desktop
(since you are trying to get it through a windows message).

You might want to consider an application that runs while the user is
logged in that sends a message to your service when the CD is inserted.

--
- Nicholas Paldino [.NET/C# MVP]
- m...@spam.guard.caspershouse.com

<arcade2...@gmail.comwrote in message

news:11*********************@p39g2000hse.googlegro ups.com...
I am trying to detect when a CD is inserted from a windows service. I
have went through the route of creating a hiden window and trying to
use the WndProc to detect the event; although the window does not seem
to be recieving the events that I need. I have also tried registering
the WM_SHNOTIFY event with my specific window and still do not recieve
the event.
Is there another method for recieving the CD insert event from within
a winows service?
Thanks.- Hide quoted text -

- Show quoted text -

Jul 10 '07 #3

This discussion thread is closed

Replies have been disabled for this discussion.