Unfortunately, Explorer simply cannot be updated every time it is told about it. Since too many applications behave badly, always use SHChangeNotify () with SHCNE_ALLEVENTS. Imagine if Explorer really always updated everything every time it received this notification (yes, sometimes several times per second!).
That is why it sometimes does not work.
But here's how you can βtrickβ the conductor: Send a notification to more than one way, from bottom to top. Usually this is enough to first send a notification, for example. N:\folder , and then for N:\ to really update N:\ .
And you must first send the WM_DEVICECHANGE message, and then call SHChangeNotify ().
source share