function Lock(const Offset: Integer; const Count: Integer):
Boolean
Available In: Server Applications
Use this method to lock a region of the file being accessed by the file stream. The method will return True if the lock succeeds, and False if the lock fails.
You are allowed to lock a region of the file that starts, or extends, beyond the physical end of the file.