EldoS | Feel safer!

Software components for data protection, secure storage and transfer

Why cannot find out a mounted drive in File Explorer?

Posted: 06/09/2016 01:18:54
by Chongho Kim (Standard support level)
Joined: 03/18/2016
Posts: 8

Why cannot find out a mounted drive in File Explorer?

When my program run as a normal application, everything's fine.
But when as a Windows Service application, something unpredictable happens.

1) My Windows Service application mount a drive with "Z:;myname;mysharename"
(global visible mode or local(user) visible mode)
2) Open File Explorer
3) Try to find out a mounted drive "Z:" named "myname"
4) Drive not on Drives or Network locations section,
but on Network>Computer section as an item named "mysharename". (@.@)
5) Open Command Prompt
6) Try to access "Z:"
7) Successfully to "DIR" (@.@)
(In command prompt, Enter 'explorer z:' -> Explorer Opens 'Z:' successfully)

* Sometimes it works fine after system reboots.

Windows 10 Pro 64 bit Korean. Version 1511.
CBFS Version 6.1.179 (latest)
Visual Studio 2015 Community

Net 4.5.1 / 64bit

if (IsNetworkDriveType)
  mCbFs.StorageCharacteristics = (int)CallbackFileSystem.scRemovableMedia;
  mCbFs.StorageCharacteristics = 0;
mCbFs.StorageType = CbFsStorageType.stDisk;
mCbFs.ParallelProcessingAllowed = false;
mCbFs.FileCacheEnabled = true;
mCbFs.SerializeCallbacks = false;
mCbFs.MinWorkerThreadCount = 2;
mCbFs.MaxWorkerThreadCount = 8;
mCbFs.UseFileCreationFlags = true;
mCbFs.MetaDataCacheEnabled = true;



string netMount = "Z:;myname;mysharename";
object authcenticationID = null;
  MountString = netMount;
  MountFlag = CallbackFileSystem.CBFS_SYMLINK_NETWORK |
  MountString = netMount;
  MountFlag = CallbackFileSystem.CBFS_SYMLINK_LOCAL |
              CallbackFileSystem.CBFS_SYMLINK_NETWORK |
  authcenticationID = desktopLUID;
mCbFs.AddMountingPoint(MountString, MountFlag, authcenticationID);
Posted: 06/09/2016 02:41:33
by Eugene Mayevski (Team)

In essence, you need to install the Mount Notifier helper DLL together with the driver. This DLL is loaded by Explorer and it gets a notification from the driver about the new disk. Then it broadcasts this notification to all processes in the user session.

Sincerely yours
Eugene Mayevski
Posted: 06/09/2016 12:43:26
by Chongho Kim (Standard support level)
Joined: 03/18/2016
Posts: 8

I already installed notifier dll.

ref Reboot);
Posted: 06/09/2016 12:55:01
by Eugene Mayevski (Team)

First of all, please use one call to Install() method to install the driver(s) and the supplementary DLLs. Then it's necessary to inspect the value of Reboot parameter after calling Install() method. In fact, Reboot will always be set to true, because helper DLLs require a reboot to be loaded to Explorer.

One more factor to consider is that you need to call Install() not on every application launch, but once per installation of your software on the user's computer (OR if GetModuleStatus method tells you that the driver is not installed, which can happen sometimes). And installing everything should be done under Administrator account. If you execute this Install() method under a regular user, it's possible that the modules are not registered right.

Sincerely yours
Eugene Mayevski



Topic viewed 3543 times

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


Back to top

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

Got it!