EldoS | Feel safer!

Software components for data protection, secure storage and transfer

OnWriteFileC Not Consistent

#7338
Posted: 08/17/2008 08:37:55
by Joe Portman (Basic support level)
Joined: 05/28/2008
Posts: 21

Using CBFilter as a base application:

Code
void CbFltWriteFileC(
        object Sender,
        string FileName,
        Int64 Position,
        IntPtr Buffer,
        Int32 BytesToWrite,
        ref IntPtr UserContext,
        ref bool ProcessRequest
        )
    {
      /*insert your code here*/
      ProcessRequest = true;
      Utilities.DebugOut("name: " + FileName + " Pos: " + Position + " Bytes: " + BytesToWrite);
    }


BytesToWrite is not always a multiple of blocksize!
On files smaller than 4k, BytesToWrite is always 4K.
But, writing a file of say: 87142 bytes, the BytesToWrite is 87142, not a multiple of blocksize at all!

#7339
Posted: 08/17/2008 09:36:51
by Eugene Mayevski (Team)

Why would you expect it to be cluster-aligned?


Sincerely yours
Eugene Mayevski

Reply

Statistics

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