Function Reference


Unlocks a region in an open file

#include <WinAPIFiles.au3>
_WinAPI_UnlockFile ( $hFile, $iOffset, $iLength )


$hFile Handle to the file that contains a region locked with _WinAPI_LockFile() function.
$iOffset The starting byte offset in the file where the locked region begins.
$iLength The length of the byte range to be unlocked.

Return Value

Success: True
Failure: False


Unlocking a region of a file releases a previously acquired lock on the file. The region to unlock must correspond
exactly to an existing locked region. Two adjacent regions of a file cannot be locked separately and then unlocked
using a single region that spans both locked regions.



See Also

Search UnlockFile in MSDN Library.