diff -r 89d6a7a84779 -r 25a17d01db0c Symbian3/PDK/Source/GUID-B31D30BF-9D55-5215-9D34-DD619D4E4D47.dita --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Symbian3/PDK/Source/GUID-B31D30BF-9D55-5215-9D34-DD619D4E4D47.dita Fri Jan 22 18:26:19 2010 +0000 @@ -0,0 +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; + } +
\ No newline at end of file