Compartilhar via


CFile::UnlockRange

Unlocks a range of bytes in an open file.

virtual void UnlockRange( 
   ULONGLONG dwPos, 
   ULONGLONG dwCount  
);

Parameters

  • dwPos
    The byte offset of the start of the byte range to unlock.

  • dwCount
    The number of bytes in the range to unlock.

Remarks

See the description of the LockRange member function for details.

Note

This function is not available for the CMemFile-derived class.

Example

CFile cfile;
cfile.Open(_T("LockRange_File.dat"), CFile::modeCreate |
   CFile::modeReadWrite);
ULONGLONG dwPos = 10;
ULONGLONG dwCount = 100;
cfile.LockRange(dwPos, dwCount);

// do something with the file

cfile.UnlockRange(dwPos, dwCount);

Requirements

Header: afx.h

See Also

Reference

CFile Class

Hierarchy Chart

CFile::LockRange