#1
|
|||
|
|||
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 ? |
#2
|
|||
|
|||
You can use RegisterDeviceNotification function in User32.dll. The documentation can be found on Platform SDK (or MSDN).
Regards O M I D |
#3
|
|||
|
|||
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 ! TNX Last edited by just4urim; 05-16-2005 at 14:03. |
#4
|
|||
|
|||
I beleive that you want dbcc_classguid = InterfaceClassGuid. Check out the example on MSDN.
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/devio/base/registering_for_device_notification.asp 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. xtx |
#5
|
|||
|
|||
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
|
Thread Tools | |
Display Modes | |
|
|
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 | 8 | 11-16-2019 04:35 |
DVD/CD VOLUME lable | hobferret | General Discussion | 4 | 08-11-2012 19:31 |