EldoS | Feel safer!

Software components for data protection, secure storage and transfer

VDisk & VMounter VCL Sample crashes

Also by EldoS: MsgConnect
Cross-platform protocol-independent communication framework for building peer-to-peer and client-server applications and middleware components.
#9719
Posted: 04/16/2009 21:40:03
by Peter Beckwith (Basic support level)
Joined: 04/16/2009
Posts: 3

We have tried two different systems but keep on getting this error after plaing the mouse over the Samples directory that is created by the VMounter Sample.

We get an assertion error: Assertion FIleAttributes.AllocationSize.QuadPart >= FileAttributes.EndOfFile.QuadPart failed in ..\umode\CBFSApi\cbsup.c at line 1725

System 1: Windows XP 64bit compiled under Delphi 2007, Internal HDD NTFS
System 2: Windows XP 32bit compiled under Delphi 2009, Internal HDD FAT32

It seems that there is a message also coming up later about Access Denied whic may, or course, be the caused of the problem but we have run the system as local administrator on both system with the same result. The Mapper example works perfectly.

Has anyone come across this problem?

Any help would be appreciated

Peter
#9720
Posted: 04/16/2009 23:43:00
by Eugene Mayevski (EldoS Corp.)

This looks like an old issue which was fixed long time ago. What exactly version number of CBFS are you trying?


Sincerely yours
Eugene Mayevski
#9723
Posted: 04/17/2009 00:14:33
by Peter Beckwith (Basic support level)
Joined: 04/16/2009
Posts: 3

I think it must be something else.

I downloaded it yesterday and the version number is 2.5.49. The Driver version is: 2.5.49.126

Thanks for the fast response

Peter
#9726
Posted: 04/17/2009 10:31:24
by Vladimir Cherniga (EldoS Corp.)

There is an error in sample code. You should rewrite the next method from VirtFile.pas like this:
Code
procedure VirtualFile.SetAllocationSize(Value: Int64);
begin
  System.SetLength(FStream, Value); <========= this string should be added
  FAllocationSize := Value;
end;
#9729
Posted: 04/17/2009 12:21:11
by Vladimir Cherniga (EldoS Corp.)

There is another, better way to fix this samples. Rewrite the next methods from VirtualFile class like this:
Code
procedure VirtualFile.SetAllocationSize(Value: Int64);
begin
  if FAllocationSize > Value then
  begin
    System.SetLength(FStream, FAllocationSize);
    FAllocationSize := System.Length(FStream);
  end;
end;

procedure VirtualFile.Write(var WriteBuf; Position: Int64; BytesToWrite: Integer; var BytesWritten: Cardinal);
begin
  if (EndOfFile - Position) < BytesToWrite then
    EndOfFile := Position + BytesToWrite;
  if FAllocationSize < EndOfFile then
    System.SetLength(FStream, EndOfFile);
  Move(WriteBuf, FStream[Position], BytesToWrite);
  BytesWritten := BytesToWrite;
  FAllocationSize := System.Length(FStream);
end;
#9731
Posted: 04/17/2009 17:46:41
by Peter Beckwith (Basic support level)
Joined: 04/16/2009
Posts: 3

Now everything seems to work perfectly.

Thanks

Peter
Also by EldoS: Solid File System
A virtual file system that offers a feature-rich storage for application documents and data with built-in compression and encryption.

Reply

Statistics

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