program TblProte;
uses PXEngine, WinCrt, WinTypes;

const TableName = 'Table';
      Password  = 'Password';

var   PxErr: Integer;
      Protected: Bool;

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

begin
  PX(PXWinInit('MyApp', pxShared));

    (* See if table is protected *)
    PxErr := PXTblProtected(TableName, Protected);
    if PxErr <> PxSuccess then
      Writeln(PxErrMsg(PxErr))
    else if Protected then
           Writeln('Table is protected')
         else Writeln('Table is not protected');

    PX(PXExit);
end.
