a1200   NEWS   APPS   DOCS   ABOUT
a1200
----
a1200
----
Autodocs
 Devices:
 printer.device
  --background--
  CMD_FLUSH
  CMD_INVALID
  CMD_RESET
  CMD_START
  CMD_STOP
  CMD_WRITE
  CallErrHook
  PBothReady
  PQuery
  PRD_DUMPRPORT
  PRD_DUMPRPORTTAGS
  PRD_EDITPREFS
  PRD_PRTCOMMAND
  PRD_QUERY
  PRD_RAWWRITE
  PRD_READPREFS
  PRD_SETERRHOOK
  PRD_WRITEPREFS
  PRead
  PWrite
Include
GuruMeditation
Docs » Autodocs » printer.device » PRD_SETERRHOOK

NAME

	PRD_SETERRHOOK -- set a hook for error messages (V44)

FUNCTION

	This command sets a hook that will be called if the printer.device
returns with an error from any other I/O command. This allows
printer drivers to use private error messages.
IO REQUEST
io_Message mn_ReplyPort set if quick I/O is not possible
io_Device preset by the call to OpenDevice
io_Command PRD_SETERRORHOOK
io_Hook a pointer to a hook that will be called
Two standard hook values a defined:
PDHOOK_NONE no error hook is to be used
PDHOOK_STD EasyRequest() is used to display the error message
The hook gets a pointer to the IORequest that caused the error as
the object and a pointer to the following structure as message:
struct PrtErrMsg {
ULONG pe_Version;
ULONG pe_ErrorLevel;
struct Window *pe_Window; /* window for EasyRequest() */
struct EasyStruct *pe_ES;
ULONG *pe_IDCMP;
APTR pe_ArgList;
};
pe_Version the message version number PDHOOK_VERSION
pe_ErrorLevel one of RETURN_WARN, RETURN_ERROR, RETURN_FAIL
pe_Window a window pointer (for EasyRequest()) or NULL
pe_ES a pointer to the error message structure
pe_IDCMP a pointer to IDCMP Flags for EasyRequest()
pe_ArgList a pointer to an array of arguments
The simplest case is to use that structure to call EasyRequest()
or to printf() a message to a console (use the error message from
pe_ES and the pe_ArgList).

Comments

Name:
E-mail: Use this if you want a message if you get a response, will not be shown.
Comment:
Select correct short for:

Spaceballs

PDX
TRSI
SPB
TBL

Comments:

$VER: d0.se 1.14 Copyright © 2011-2024 Tobias Geijersson support at d0 dot se