EldoS | Feel safer!

Software components for data protection, secure storage and transfer

AddMountingPoint access with version 5

Posted: 02/27/2015 13:56:49
by Tim Sullivan (Standard support level)
Joined: 05/01/2008
Posts: 15

I inherited another developers code (he was using 4.0) and this call worked just fine when accessing the mounted folder on his machine -- \\.\t_MountingPoint

mCbFs.AddMountingPoint(t_MountingPoint, CallbackFileSystem.CBFS_SYMLINK_SIMPLE, null);

I have ported his code to a new computer now using version 5.0 and when accessing \\.\t_MountingPoint, I get the error code: 0x80004005.

On the 5.0 machine, if I change the call to use a drive letter I have no issues accessing Z:\ with this code:

mCbFs.AddMountingPoint("Z:", CallbackFileSystem.CBFS_SYMLINK_MOUNT_MANAGER, null);

I suspect I'm failing to do something simple, but it's not easy to tell because no errors are ever reported from the code. I only have problems when attempting to access the folder.
Posted: 02/28/2015 05:27:46
by Volodymyr Zinin (Team)

Is the problem reproducible with the Mapper sample? If so please specify in details how to do it.

Posted: 03/02/2015 17:44:35
by Tim Sullivan (Standard support level)
Joined: 05/01/2008
Posts: 15

Appears to be reproducible with Mapper.

I screen grabbed the whole thing so please have a look. I only updated Mapper with my Reg key and changed the AddMountingPoint argument from CBFS_SYMLINK_MOUNT_MANAGER to CBFS_SYMLINK_SIMPLE.
The values I'm using are shown in the dialog of the screenshot.

Posted: 03/03/2015 03:20:33
by Volodymyr Zinin (Team)

Such type of mounting points (like "t_MountingPoint" with CBFS_SYMLINK_SIMPLE) are not accessible via Explorer. And they also have not been accessible in CBFS v4 too. Actually you can use them only by means of win32 or NT API (with CreateFile, ZwCreateFile). Also in command line some commands also work. For example:
echo 111 > \\.\MountingPoint\111.txt
notepad.exe \\.\MountingPoint\111.txt

There are another type of mounting points that have quite similar behavior, but works in Explorer and anywhere (because they are native to Windows). It's network mounting points (CBFS_SYMLINK_NETWORK). So maybe use this one.
Posted: 03/04/2015 11:23:33
by Tim Sullivan (Standard support level)
Joined: 05/01/2008
Posts: 15

I was able to verify things are working when using:
echo 111 > \\.\MountingPoint\111.txt

However, when I changed the mounting to use CBFS_SYMLINK_NETWORK, I was not able to view using Windows Explorer.

I did some further research on your forums and found this to be most helpful...

When doing AddMountingPoint(";var;var2", CBFS_SYMLINK_NETWORK, null), I do get the result I was hoping for which is a visible directory in Explorer.

It appears to me that the "var" for servername is quite necessary. Now I can utilize from Explorer like this: \\var\var2.
Posted: 03/04/2015 11:51:02
by Volodymyr Zinin (Team)

In order to have "more hidden" network mounting point add CBFS_SYMLINK_NETWORK_HIDDEN_SHARE to AddMountingPoint call. It protects the created UNC path from enumerating. So Explorer won't show the share name in the list of network shares until someone doesn't access it (for example manually enter in the Explorer's command bar).
Posted: 03/10/2015 18:20:51
by Tim Sullivan (Standard support level)
Joined: 05/01/2008
Posts: 15

Things were going smoothly but I had to move my project to an older snapshot of my VM. After doing this I lost my ability to 'see' the network share I created in Windows Explorer. Now I'm back to my original problem...

I'm still using the same code which amounts to this:
mCbFs.AddMountingPoint(";AP;" + t_MountingPoint, CallbackFileSystem.CBFS_SYMLINK_NETWORK, null);

With the former VM, I could use Explorer and display \\AP
With the older snapshot VM I'm using now I get the Network Error - 0x80004005

Using DOS commands work fine, such as:
> more \\AP\File\test.txt
> notepad \\AP\File\test.txt
> dir \\AP\File\test.txt

Am I missing some config detail? Any ideas?
Posted: 03/11/2015 04:57:13
by Volodymyr Zinin (Team)

Try to uninstall the driver, reboot the VM and install the driver again.
Posted: 03/11/2015 12:15:32
by Tim Sullivan (Standard support level)
Joined: 05/01/2008
Posts: 15

Success. Though, I had to do the uninstall from Mapper as the call didn't work successfully from my own code (access denied).



Topic viewed 3311 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!