EldoS | Feel safer!

Software components for data protection, secure storage and transfer

Mounted Drive Properties

Also by EldoS: CallbackDisk
Create virtual disks backed by memory or custom location, expose disk images as disks and more.
#34056
Posted: 07/16/2015 15:22:36
by Henri Hein (Standard support level)
Joined: 02/13/2015
Posts: 14

Our product mounts a volume as a separate drive. The drive appears in Explorer and I can interact with it as I expect. However, its properties do not always appear in Explorer. See attached image. It usually comes up as a generic drive, such as the "Removable Disk" in the image. (I tried different volume types, and all that does is change the generic name of the volume.)

I call SHChangeNotify() with the path after I mount. I also walk the list of Explorer view windows (IShellView) and call Refresh on each instance showing "This PC." None of this seems to help. (That's not quite true. SHChangeNotify makes the drive show up, but just not with the correct properties.)

I know Explorer is notorious for caching things, but I wonder if others have seen this and if there are known fixes or workarounds. It's a minor cosmetic issue, not functional at all, but as this is one of the first things the user sees, it's potentially important. The user may not even recognize the new drive as part of our product.




Henri Hein
Thin Air Labs, Inc
#34057
Posted: 07/16/2015 15:25:20
by Henri Hein (Standard support level)
Joined: 02/13/2015
Posts: 14

Below is a screenshot of how I would like the drive to appear. The code is exactly the same in the two scenarios -- it seems arbitrary whether Explorer shows the volume name or not. (The volume name is fixed and ready even before the mounting happens).




Henri Hein
Thin Air Labs, Inc
#34060
Posted: 07/16/2015 17:38:26
by david bennett (Standard support level)
Joined: 03/29/2013
Posts: 50

Have you looked at the function SetStorageCharacteristics()? You should be able to turn off the "Removable Drive" attribute from that.

There is a Callback Function named OnGetVolumeLabel() which, if you provide it, should allow you to change the volume name that appears.

Sorry if you already knew about these things and tried them.
#34072
Posted: 07/17/2015 18:16:20
by Henri Hein (Standard support level)
Joined: 02/13/2015
Posts: 14

David:

Thanks for the response. I did indeed try SetStorageCharacteristics and tried different volume types, but they all yield more or less the same result. I say more or less, because the intermittency of the issue makes it hard to quantify exactly. Note that it is not so much the particulars of the generic name I'm worried about, it's the fact that is shows a generic name and not the name of the volume. It also fails to show the capacity numbers. I could get past that, but I suspect the two are related.

I do provide OnGetVolumeLabel(), but Explorer just doesn't call it in the failure case.


Henri Hein
Thin Air Labs, Inc

Reply

Statistics

Topic viewed 3217 times

Number of guests: 1, registered members: 0, in total hidden: 0




|

Back to top

As of July 15, 2016 EldoS Corporation will operate as a division of /n software inc. For more information, please read the announcement.

Got it!