EldoS | Feel safer!

Software components for data protection, secure storage and transfer

How to mount a storage as a Local Hard Disk?

Also by EldoS: CallbackRegistry
A component to monitor and control Windows registry access and create virtual registry keys.
#20185
Posted: 05/17/2012 21:02:50
by Kenny Kim (Standard support level)
Joined: 08/19/2009
Posts: 38

Hello.

I am trying to mount a storage as a Local Hard Disk, not as a Removable Storage.

As indicated in CBFS Help, if the driver is installed with False value in SupportPnP parameter in "CallbackFileSystem.Install()" method, we should be able to mount the storage as a Local Hard Disk.

But, still it is mounting the storage as a Removable Disk(please, refer to the attached image).

I'm also setting the storage type as "CbFsStorageType.stDisk", even though it is the default value.

OS: Windows 7 Prof. x64.
CBFS Driver Ver.: 3.2.107.271.

Thank you.


#20186
Posted: 05/18/2012 01:10:55
by Eugene Mayevski (EldoS Corp.)

The image shows the filesystem type as NTFS. Are you naming it this way?

Also can you show the piece of code which sets disk parameters before mounting?

In general, if you want to get a physical device being emulated, you need to set SupportPnP to TRUE during installation, then set StorageType to stDiskPnP.


Sincerely yours
Eugene Mayevski
#20188
Posted: 05/18/2012 03:12:12
by Kenny Kim (Standard support level)
Joined: 08/19/2009
Posts: 38

Quote
Eugene Mayevski wrote:
The image shows the filesystem type as NTFS. Are you naming it this way?
Yes (mCbFs.SetFileSystemName("NTFS").

Quote
Eugene Mayevski wrote:
Also can you show the piece of code which sets disk parameters before mounting?
I'm creating the storage in this sequence:
Code
mCbFs.StorageType=CbFsStorageType.stDisk;
mCbFs.CreateStorage();
mCbFs.MountMedia(0);
mCbFs.SetFileSystemName("NTFS");
mCbFs.AddMountingPoint(edtMountinPoint.Text);
UpdateMountingPoints();


Thank you.


#20189
Posted: 05/18/2012 03:39:15
by Eugene Mayevski (EldoS Corp.)

Please also explicitly set StorageCharacteristics property. And then you can try the PnP disk.


Sincerely yours
Eugene Mayevski
#20190
Posted: 05/18/2012 03:44:15
by Volodymyr Zinin (EldoS Corp.)

Add the following call:
mCbFs.StorageCharacteristics = 0;

BTW: It works with the storage type stDisk as well as stPnPDisk.
#20191
Posted: 05/18/2012 04:23:38
by Kenny Kim (Standard support level)
Joined: 08/19/2009
Posts: 38

Quote
Vladimir Zinin wrote:
Add the following call:mCbFs.StorageCharacteristics = 0;

BTW: It works with the storage type stDisk as well as stPnPDisk.

By adding "mCbFs.StorageCharacteristics = 0;" call I was able to mount a Local Disk Drive.
Code
mCbFs.StorageType=CbFsStorageType.stDisk;
mCbFs.StorageCharacteristics = 0;
mCbFs.CreateStorage();
mCbFs.MountMedia(0);
mCbFs.SetFileSystemName("NTFS");
mCbFs.AddMountingPoint(edtMountinPoint.Text);
UpdateMountingPoints();


Thank you!
Also by EldoS: CallbackProcess
A component to control process creation and termination in Windows and .NET applications.

Reply

Statistics

Topic viewed 1144 times

Number of guests: 2, 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!