Hi all,
I’m developping a user mode service. I will use the service program to
monitor the add and remove of the physical drive.
I implement it in this way:
1.RegisterDeviceNotification with filter DBT_DEVTYP_DEVICEINTERFACE
2.Process the WM_DEVICECHANGE message
What I need is to get the symbolic link of the physical drive like
“\.\PhysicalDrive1”.
I can do it by send IOCTL_STORAGE_GET_DEVICE_NUMBER when physical drive is
arrival, but it seems I can’t do this when it is removed.
So could anyone offer some idea? Thanks in advance.
Ted Chang