Go Back   Exetools > General > General Discussion


Thread Tools Display Modes
Old 05-15-2005, 17:52
Posts: n/a
Cool Mount Volume Notification

Hi all

I have a BIG problem with notification about mounted volumes . I want to implement an application (in user/kernel mode) that could be notified whenever any removable medias( like Floppy or CD-ROM) or network drive is being mounted.
You know ,my app.(in user mode) could be notified about any modification on certain Dir (including file rename , create or delete ) by using 'FindFirstChangeNotification'.
But It does not work on drive which have not been mounted yet.
how can i solve it ?
Reply With Quote
Old 05-16-2005, 00:50
omidgl omidgl is offline
Join Date: Jul 2004
Posts: 86
Rept. Given: 10
Rept. Rcvd 4 Times in 3 Posts
Thanks Given: 0
Thanks Rcvd at 5 Times in 5 Posts
omidgl Reputation: 4
You can use RegisterDeviceNotification function in User32.dll. The documentation can be found on Platform SDK (or MSDN).

Reply With Quote
Old 05-16-2005, 11:53
Posts: n/a
Hi ,
I used RegisterDeviceNotification , but i don't know which GUID i should use in dbcc_classguid to receive the notification of new arrival volumes!
I also used DEV_BROADCAST_VOLUME as the second parameter of RegisterDeviceNotification ,
and set its filed as follow :
.dbcv_size = sizeof(DEV_BROADCAST_VOLUME );
.dbcv_devicetype = DBT_DEVTYP_VOLUME;
.dbcv_unitmask = 0x0001 ;
.dbcv_flags = DBTF_MEDIA ;
but it failed !

Last edited by just4urim; 05-16-2005 at 14:03.
Reply With Quote
Old 05-17-2005, 03:23
Posts: n/a
I beleive that you want dbcc_classguid = InterfaceClassGuid. Check out the example on MSDN.


Also in RegisterDeviceNotification the value DEVICE_NOTIFY_ALL_INTERFACE_CLASSES can be set and will ignore dbcc_classguid but that is only in specific cases.

Reply With Quote
Old 05-26-2005, 03:28
Posts: n/a
Tnx for all comments , I did it by attaching to their file system and process the return STATUS code to detect it if the media is exist or not . it's not complete but i'm trying
Reply With Quote

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Where do programs store the check against Volume ID (HWID, Volume Serial, etc.)? binarylaw General Discussion 9 11-16-2019 04:35
DVD/CD VOLUME lable hobferret General Discussion 4 08-11-2012 19:31

All times are GMT +8. The time now is 23:20.

Always Your Best Friend: Aaron, JMI, ahmadmansoor, ZeNiX, chessgod101
( 1998 - 2023 )