diff -r ebc84c812384 -r 46218c8b8afa Symbian3/PDK/Source/GUID-CFB48D1D-E6AE-502E-AA08-D2F3696DFF87.dita --- a/Symbian3/PDK/Source/GUID-CFB48D1D-E6AE-502E-AA08-D2F3696DFF87.dita Thu Mar 11 15:24:26 2010 +0000 +++ b/Symbian3/PDK/Source/GUID-CFB48D1D-E6AE-502E-AA08-D2F3696DFF87.dita Thu Mar 11 18:02:22 2010 +0000 @@ -1,58 +1,58 @@ - - - - - -Locking -a Large File How to lock a section of a large file. -

The RFile64::Lock() function -has a TInt64 parameter that specifies the position to lock -from. By using a TInt64 rather than a TInt, -the function can lock a section of file that is greater than 2GB–1.

See RFile64::Lock(TInt64 -aPos, TInt64 aLength).

- -Use 64-bit RFile64 rather -than RFile. -// RFile file; -RFile64 file; - -Replace TInt variables -with TInt64 variables. -Use a TInt64 variable if a lock position in a file -that is greater than 2GB–1 is required. -// TInt lockPosition, lockLength; -TInt64 lockPosition, lockLength; - - -Lock example

The example below shows a variable -of the type TInt64 being used to specify the lock position -and the lock length being used together with the RFile64 class.

// RFile file; - RFile64 file; - TInt err = file.Open(TheFs, _L(“BIGFILE.BIG”), EFileWrite); - if(err != KErrNone) - { - // handle error - return err; - } - - // Large file access is now supported! - // TInt lockPosition, lockLength; - TInt64 lockPosition, lockLength; - err = file.Lock(lockPosition,lockLength); - if(err != KErrNone) - { - //could return with KErrArgument if lockPosition+lockLength>63Bytes - return err; - } -
-

You must unlock -the section of file using RFile64::Unlock(), as explained -in Unlocking a Large -File.

+ + + + + +Locking +a Large File How to lock a section of a large file. +

The RFile64::Lock() function +has a TInt64 parameter that specifies the position to lock +from. By using a TInt64 rather than a TInt, +the function can lock a section of file that is greater than 2GB–1.

See RFile64::Lock(TInt64 +aPos, TInt64 aLength).

+ +Use 64-bit RFile64 rather +than RFile. +// RFile file; +RFile64 file; + +Replace TInt variables +with TInt64 variables. +Use a TInt64 variable if a lock position in a file +that is greater than 2GB–1 is required. +// TInt lockPosition, lockLength; +TInt64 lockPosition, lockLength; + + +Lock example

The example below shows a variable +of the type TInt64 being used to specify the lock position +and the lock length being used together with the RFile64 class.

// RFile file; + RFile64 file; + TInt err = file.Open(TheFs, _L(“BIGFILE.BIG”), EFileWrite); + if(err != KErrNone) + { + // handle error + return err; + } + + // Large file access is now supported! + // TInt lockPosition, lockLength; + TInt64 lockPosition, lockLength; + err = file.Lock(lockPosition,lockLength); + if(err != KErrNone) + { + //could return with KErrArgument if lockPosition+lockLength>63Bytes + return err; + } +
+

You must unlock +the section of file using RFile64::Unlock(), as explained +in Unlocking a Large +File.

\ No newline at end of file