The UnlockFile function unlocks a region in an open file. Unlocking a region enables other processes to
access the region.
For an alternate way to specify the region, use the UnlockFileEx function.
BOOL UnlockFile(
HANDLE hFile,
DWORD dwFileOffsetLow,
DWORD dwFileOffsetHigh,
DWORD nNumberOfBytesToUnlockLow,
DWORD nNumberOfBytesToUnlockHigh
);
Parameters
hFile
[in]
Handle to a file that contains a region locked with LockFile. The file
handle must have been created with either the GENERIC_READ or GENERIC_WRITE
access right. For more information, see File Security and
Access Rights.
dwFileOffsetLow
[in] Low-order word of the starting byte offset in the file where the locked region begins.
dwFileOffsetHigh
[in] High-order word of the starting byte offset in the file where the locked region begins.
Windows Me/98/95: dwFileOffsetHigh must be 0, the sign extension of the value of dwFileOffsetLow. Any other value will be rejected.
nNumberOfBytesToUnlockLow
[in] Low-order word of the length of the byte range to be unlocked.
nNumberOfBytesToUnlockHigh
[in] High-order word of the length of the byte range to be unlocked.