Export (0) Print
Expand All

CFile::UnlockRange

Unlocks a range of bytes in an open file.

virtual void UnlockRange( 
   ULONGLONG dwPos, 
   ULONGLONG dwCount  
);

dwPos

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

dwCount

The number of bytes in the range to unlock.

See the description of the LockRange member function for details.

Note Note

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

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);

Header: afx.h

Show:
© 2014 Microsoft