EldoS | Feel safer!

Software components for data protection, secure storage and transfer

AddMountingPoint Delays

Posted: 04/09/2013 21:25:41
by ujsoft (Basic support level)
Joined: 04/09/2013
Posts: 2


I am experiencing noticable delays on calls to AddMountingPoint.
I start several processes that execute the code below.
The observation is that every other process gets delayed
on the call to AddMountingPoint.

CbFs driver version is
Calling from 32 bit process on Windows 7 64 bit

Any ideas what may be the reason?

Thank you.

  FCbFS := TCallbackFileSystem.Create(nil);
  FCbFsBridge := TCbFsEventHandlerBridge.Create(FCbFs, SyncLayer);

  FCbFs.OnFlushFile := nil;
  FCbFs.OnGetFileNameByFileId := nil;
  FCbFs.OnGetFileSecurity := nil;
  FCbFs.OnSetFileSecurity := nil;

  FCbFS.SerializeCallbacks := True;
  FCbFS.MetaDataCacheEnabled := False;
  FCbFS.CallAllOpenCloseCallbacks := True;
  FCbFS.ShortFileNameSupport := False;

  FCbFS.GetModuleStatus(CBFS_Guid, CBFS_MODULE_DRIVER, Installed, VersionHigh,
    VersionLow, nil);
  if not Installed then
    raise Exception.Create(SDriverNotInstalled);


  FCbFS.AddMountingPoint(MountAs, CBFS_SYMLINK_SIMPLE, nil);  //<<< DELAY !!!
Posted: 04/09/2013 23:40:22
by Eugene Mayevski (Team)

First please remember to mark your code pieces with CODE tag or corresponding CODE button above the message box on this page.

Now to your question. Check if Mapper sample exposes the same problem. If it does, then it's something in the system ( some antivirus, application firewall etc) slows down operations.

If Mapper works fine but your code doesn't, try to narrow down the problem by commenting out logic in event handlers changing StorageType and StorageCharacteristics

Sincerely yours
Eugene Mayevski
Posted: 04/10/2013 17:50:08
by ujsoft (Basic support level)
Joined: 04/09/2013
Posts: 2


Below is console version of Mapper sample provided with CbFs.
It uses Eldos code in Main.pas, but this is console application.
Attached is a screenshot of what I see on my PC.
Like I said every other process gets delayed on call to FCbFs.AddMountingPoint.
Simply run this program from Windows Explorer and hopefully you will see the problem.

Thanks a lot,

program ConsoleMapper;


{$R *.res}

  Main in 'C:\Program Files (x86)\EldoS\Callback File System\Samples\VCL\Mapper\Main.pas' {frmMain};

  DriveLetters: array[0..3] of Char = ('K', 'L', 'M', 'N');

function FindDriveLetter: Char;
  I: Integer;
  Root: string;
  Result := #0;
  for I := Low(DriveLetters) to High(DriveLetters) do
    Root := DriveLetters[I] + ':\';
    if GetDriveType(PChar(Root)) = DRIVE_NO_ROOT_DIR then
      Result := DriveLetters[I];

  DriveLetter: Char;
  TickCount: Cardinal;
  DriveLetter := FindDriveLetter;
  if DriveLetter <> #0 then
    frmMain := TfrmMain.Create(nil);
      frmMain.edtRootPath.Text := ExtractFilePath(ParamStr(0));
      frmMain.edtMountinPoint.Text := DriveLetter + ':';

      TickCount := GetTickCount();
      Writeln(Format('Adding mounting point %s: ...', [DriveLetter]));

      Writeln(Format('Done. Elapsed: %d ms', [GetTickCount() - TickCount]));

      Writeln('Press Enter to exit...');
    on E: Exception do
      Writeln(E.ClassName, ': ', E.Message);

Posted: 04/11/2013 03:31:06
by Volodymyr Zinin (Team)

Moved to helpdesk.



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