program TblDecry;
uses PXEngine, WinCrt;

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

var   PxErr: Integer;

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

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

  (* Attempt to decrypt the table *)
  PxErr := PXTblDecrypt(TableName);
  if PxErr <> PxSuccess then
    Writeln(PxErrMsg(PxErr));

  PX(PXExit);
end.
