EldoS | Feel safer!

Software components for data protection, secure storage and transfer

Virtual Drive is not present after rebooting

Also by EldoS: CallbackDisk
Create virtual disks backed by memory or custom location, expose disk images as disks and more.
#9980
Posted: 05/11/2009 14:39:57
by Khayralla AL-Athari (Standard support level)
Joined: 09/23/2008
Posts: 75

Hi

One of our customers reported that he was unable to see the virtual drive in the windows explorer after rebooting his machine.

Then he stops the service (our application) and restarts it again, and then the virtual drive is present.

We are using ver. 2.5.49.29106
On XP SP3 machine.

We are following these steps When we Install our service (ConfigSetup):

1) Uninstall any previous CBFS Derive (if there is one already installed).

2) install CBFS Derive.

3) Sometimes user asked to reboot

All this is done by an Install application (configApplication.cs).

when the user machine start, our service will double check if the drive is not installed. then we follow the code in MasterService.cs

I attached a C# sample file that we are using.

The question is Do we forget some thing in the code.
I am following the code in the VDisk sample.

Thanks in advance
(Sorry for broken English)


[ Download ]
#9981
Posted: 05/12/2009 00:04:30
by Eugene Mayevski (EldoS Corp.)

As I understand, you create the drive from the service. Do you install and use the helper DLL (VSMntNtf.dll) which notifies Explorer and other applications that the new drive has appeared?


Sincerely yours
Eugene Mayevski
#9991
Posted: 05/12/2009 09:24:51
by Khayralla AL-Athari (Standard support level)
Joined: 09/23/2008
Posts: 75

Quote

you create the drive from the service

No, I am creating the drive in another application which is launching only one time at the beginning of installation. Then the user asked to reboot, When he reboot, our service start and I double check again in the service if the drive is installed or not.

Quote

Do you install and use the helper DLL (VSMntNtf.dll) which notifies Explorer and other applications that the new drive has appeared?

Yes, I install VSMntNtf.dll in the service, and I get a true reboot value each time I start the service.But we cannot start the service again.
#9992
Posted: 05/12/2009 09:37:54
by Eugene Mayevski (EldoS Corp.)

Callback File System doesn't work this way. You must call AddMountingPoint() etc. in order to get the drive. So if you don't call it from the service, you don't get the disk.


Sincerely yours
Eugene Mayevski
#9993
Posted: 05/12/2009 09:44:19
by Khayralla AL-Athari (Standard support level)
Joined: 09/23/2008
Posts: 75

We call all CBFS functions:
Code
            this.mCbFs = new CallbackFileSystem();
            this.CbFsCreateEvents();
            this.mCbFs.StorageType = CbFsStorageType.stDisk;
            this.mCbFs.StorageCharacteristics = 0;
            if (this.CreateStorage())
            {
                this.Mount();
                this.AddPoint();
            }
            this.InstallDriverVSMntNtf();


And I am calling VSMntNtf after doing all necessary steps.

Sometimes it present after the first reboot, other times is not present.
#9994
Posted: 05/12/2009 10:23:04
by Volodymyr Zinin (EldoS Corp.)

You need to install the driver and VSMntNtf.dll only one time (for instance during your software installation). If the installation function returns true in the RebootNeeded parameter then reboot the machine. After that you can use the CallbackFS features. So your code is right but only except the last line.
Also if you create the "local" mounting point (the LocalLink parameter is true) then it's necessary to specify an AuthenticationID for a session where the mounting point must be created. In the other case (when the LocalLink parameter is false) AuthenticationID can be NULL.
#9996
Posted: 05/12/2009 10:33:07
by Eugene Mayevski (EldoS Corp.)

No need to say that the code presented in the last message should be run in the service when the service starts. This doesn't follow from your messages.


Sincerely yours
Eugene Mayevski
#9997
Posted: 05/12/2009 10:49:00
by Khayralla AL-Athari (Standard support level)
Joined: 09/23/2008
Posts: 75

Vladimir

OK, I will install the drive during installation time.

for LocalLink, I am using
mCbFs.AddMountingPoint()

DO I have to use
mCbFs.AddMountingPointEx(vDriveName, false);
third parameter AuthenticationID (CallbackFs.LUID) give compiler error if I use it like mCbFs.AddMountingPointEx(vDriveName, false, null);

Eugene
I didn't understand what you mean.

the above code (post Created: 05/12/2009 09:44:19)is under
[PermissionSet(SecurityAction.Demand, Name = "FullTrust")]
protected override void OnStart(string[] args)

thanks for all
#9998
Posted: 05/12/2009 11:43:14
by Volodymyr Zinin (EldoS Corp.)

Use mCbFs.AddMountingPoint("x:"). This creates the global type of mounting point (that is visible in all sessions). It is the same to mCbFs.AddMountingPointEx("x:", false, null).

Quote
Khayralla AL-Athari wrote:
third parameter AuthenticationID (CallbackFs.LUID) give compiler error if I use it like mCbFs.AddMountingPointEx(vDriveName, false, null);

Instead of null you can pass AuthenticationID that contains zero.
#9999
Posted: 05/12/2009 11:46:42
by Khayralla AL-Athari (Standard support level)
Joined: 09/23/2008
Posts: 75

Ok

Thanks Vladimir , Eugene

I appreciate yours immediate help
Also by EldoS: CallbackDisk
Create virtual disks backed by memory or custom location, expose disk images as disks and more.

Reply

Statistics

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