diff -r ebc84c812384 -r 46218c8b8afa Symbian3/PDK/Source/GUID-B31D30BF-9D55-5215-9D34-DD619D4E4D47.dita --- a/Symbian3/PDK/Source/GUID-B31D30BF-9D55-5215-9D34-DD619D4E4D47.dita Thu Mar 11 15:24:26 2010 +0000 +++ b/Symbian3/PDK/Source/GUID-B31D30BF-9D55-5215-9D34-DD619D4E4D47.dita Thu Mar 11 18:02:22 2010 +0000 @@ -1,52 +1,52 @@ - - - - - -Unlocking -a Large File How to unlock a section of a large file. -

RFile64::Unlock() allows a section of data -within a file to be unlocked. This function uses 64-bit TInt64 variables -rather than 32-bit TInt variables. The area to unlock within -a file is specified by the starting position and length of the area. Using -a 64-bit variable rather than a 32-bit variable allows the specified position -and length of the section to be greater than 2GB-1.

- -Use the 64-bit RFile64 class -instead of the 32-bit RFile class. -//RFile file; -RFile64 file; - -Use a TInt64 variable -to specify the position and length of the file to unlock. -TInt r; -// TInt lockPosition, lockLength; -TInt64 lockPosition, lockLength; -... -r = file.UnLock(lockPosition, lockLength); - - -Unlock example // Replace RFile with RFile64 - RFile64 file; - TInt err = file.Open(TheFs, _L(“BIGFILE.BIG”), EFileWrite); - if(err != KErrNone) - { - // handle unrelated error - return err; - } - - // Change the TInt type to TInt64 - TInt64 lockPosition, lockLength; - err = file.UnLock(lockPosition,lockLength); - if(err != KErrNone) - { - //could return with KErrArgument if lockPosition + lockLength > 63Bytes - return err; - } + + + + + +Unlocking +a Large File How to unlock a section of a large file. +

RFile64::Unlock() allows a section of data +within a file to be unlocked. This function uses 64-bit TInt64 variables +rather than 32-bit TInt variables. The area to unlock within +a file is specified by the starting position and length of the area. Using +a 64-bit variable rather than a 32-bit variable allows the specified position +and length of the section to be greater than 2GB-1.

+ +Use the 64-bit RFile64 class +instead of the 32-bit RFile class. +//RFile file; +RFile64 file; + +Use a TInt64 variable +to specify the position and length of the file to unlock. +TInt r; +// TInt lockPosition, lockLength; +TInt64 lockPosition, lockLength; +... +r = file.UnLock(lockPosition, lockLength); + + +Unlock example // Replace RFile with RFile64 + RFile64 file; + TInt err = file.Open(TheFs, _L(“BIGFILE.BIG”), EFileWrite); + if(err != KErrNone) + { + // handle unrelated error + return err; + } + + // Change the TInt type to TInt64 + TInt64 lockPosition, lockLength; + err = file.UnLock(lockPosition,lockLength); + if(err != KErrNone) + { + //could return with KErrArgument if lockPosition + lockLength > 63Bytes + return err; + }
\ No newline at end of file