program FUnlock;
uses PXEngine, WinCrt;

const FileName = 'Table.DB';

var   PxErr: Integer;

procedure PX(Code : integer);
begin
  writeln(PXErrMsg(Code));
end;

begin
  PX(PXWinInit('MyApp', pxShared));
  PX(PXNetFileLock(FileName, WL));

  (* Attempt to unlock a file write-lock *)
  PxErr := PXNetFileUnlock(FileName, WL);
  if PxErr<> PxSuccess then
    Writeln(PxErrMsg(PxErr));

  PX(PXExit);
end.
