{ OS/2 specific implementation of the functions declared in VpUsrLow }

function SysLockFile(_Handle, _LockStart, _LockLength: LongInt): LongInt;
var
  lock,
  unlock: FileLock;
begin
  with lock do
    begin
      lOffset:= _LockStart;
      lRange:= _LockLength;
    end;
  FillChar(unlock, sizeof(FileLock), 0);
  SysLockFile := DosSetFileLocks(_Handle, unlock, lock, 1000, 0);
end;

function SysUnLockFile(_Handle, _LockStart, _LockLength: LongInt): LongInt;
var
  lock,
  unlock: FileLock;
begin
  with unlock do
    begin
      lOffset := _LockStart;
      lRange := _LockLength;
    end;
  fillchar(lock, sizeof(FileLock),0);
  SysUnLockFile := DosSetFileLocks(_Handle, unlock, lock, 1000, 0);
end;

