program ErrMsg;
uses PXEngine, WinCrt;

var   PxErr: Integer;
      TblHandle: TableHandle;

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

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

  (* Open a non-existing table *)
  PxErr := PXTblOpen('ZZ:\TOP', TblHandle, 0, False);

  (* Print associated error message *)
  Writeln(PXErrMsg(PxErr));

  PX(PXExit);
end.
