EldoS | Feel safer!

Software components for data protection, secure storage and transfer

Avoid Drive Letter

Posted: 10/27/2015 14:01:16
by Gianandrea Terzi (Standard support level)
Joined: 11/13/2014
Posts: 9

For a specific project I will need to create multiple temporary CBFS instances that will be very short lived. I would like to avoid making drives appear and disappear from explorer.

Would it be possible to access the data from code using the full path (eg \\?\\etc) and avoid the drive creation in explorer?
Posted: 10/27/2015 14:58:55
by Volodymyr Zinin (Team)

Drive letter is created only if you call the AddMountingPoint method with a drive letter specified (i.e. if the mounting point name is something like "X:"). In the case you don't want to create drive letter but want to access the created disk use for example:
cbfs_instance.AddMountingPoint("qwerty", CBFS_SYMLINK_SIMPLE, null);

and then use the path "\\.\qwerty" to access the created storage. For example in the case you use C++ and win32 API a file on the created storage can be opened by the use:
HANDLE h = CreateFile(L"\\\\.\\qwerty\\1.txt", ....);
ReadFile(h, ...);
WriteFile(h, ...);



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