Drive buttons don't properly detect changes

Please report only one bug per message!

Moderators: white, Hacker, petermad, Stefan2

nicolap
Junior Member
Junior Member
Posts: 9
Joined: 2011-09-13, 08:55 UTC

Post by *nicolap »

The strange thing is that if I close then restart TC the drive list doesn't change! So, I think, it's not a problem of WM_DEVICECHANGE message.

For what I can see the "insert notification" is enabled.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48079
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

If the drive list doesn't change, then GetDriveType still reports the drive as being there. The Explorer probably uses a different Windows function to check whether a drive is there or not...
Author of Total Commander
https://www.ghisler.com
nicolap
Junior Member
Junior Member
Posts: 9
Joined: 2011-09-13, 08:55 UTC

Post by *nicolap »

ghisler(Author) wrote:If the drive list doesn't change, then GetDriveType still reports the drive as being there. The Explorer probably uses a different Windows function to check whether a drive is there or not...
I written a small program to test this and can confirm that the problem is not in TC but in Windows!
The GetDriveType function is reporting drives that are already dismounted.
Thanks for your support
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48079
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Any idea what else could be used to detect the drives?
Author of Total Commander
https://www.ghisler.com
gdpr deleted 6
Power Member
Power Member
Posts: 872
Joined: 2013-09-04, 14:07 UTC

Post by *gdpr deleted 6 »

ghisler(Author) wrote:Any idea what else could be used to detect the drives?
GetLogicalDrives in conjunction with GetDriveType, perhaps?
(Unless the focus should be on detecting a removable media drive type without inserted media, in which case StackOverflow might help: http://stackoverflow.com/questions/3158054/how-to-detect-if-media-is-inserted-into-a-removable-drive-card-reader - i leave the cost/benefit calculation in your capable hands :D )
Post Reply