View Full Version : CD change event
Ron
October 13th, 2002, 12:55 PM
A thought, I'm not sure if this is correct but I heard it might be a problem. I've created a plugin ( as MMcM has too ) that intercepts this message. Now in some machines my plugin didn't get the message. We had no idea why until someone told us to turn on the CD insert notification, then it works. Obviously this is a strange policy of Microsoft to disable this message also if the notification is off. Usually people disable this notification because they don't want the autorun stuff to work.
So I have not tested this myself but I heard that some people had luck with this.
MMcM
October 13th, 2002, 12:55 PM
Is your window top-level (NULL parent)? The message is only broadcast to all top-level windows. Child windows have to ask for it explicitly.
Eelector
October 13th, 2002, 12:55 PM
I need some way to sense CD/DVD changes in C++ (pref. without use of external programs)
I've added WM_DEVICECHANGE to my wndproc, but it never triggers when a cd or dvd is inserted or removed. Strangely enough the event has occured with no apparent reason while running the program (and not doing anything with the CD or DVD.
What am I missing here? Is there some feature that has to be activated in order to get these messages to my program?
please give me some ideas :)
Eelector
October 13th, 2002, 12:55 PM
Is your window top-level (NULL parent)? The message is only broadcast to all top-level windows. Child windows have to ask for it explicitly.
Yes, CreateWindowEx() get a NULL argument for hWndParent.
(and it was the active window as well, when I tried changing cd)
Powered by vBulletin® Version 4.1.8 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.