I am working on a component in C to detect volume mount and unmount on Windows. When working with volume mounted on drive letters, everything works great by listening for
WM_DEVICECHANGE with wparam set to
DBT_DEVICEREMOVECOMPLETE with dbch_devicetype set to
DBT_DEVTYP_VOLUME in my top level window event handler.
However, when volumes are mounted on a directory path, I no longer receive
WM_DEVICECHANGE event when mounting and unmounting on directory path.
Is there a way to listen for mount path changes?