An Example Application [ HP DeskManager Customization ] MPE/iX 5.0 Documentation
HP DeskManager Customization
An Example Application
A sample of the application interrupt capability is as follows:
A user signs on to HP Desk and runs an application program. The
application program generates a report into an MPE file. It then sets
the JCW HPDESKPROCCONTROL to the value of 4--which is the number of the
Interrupt Mode being requested. After this, it writes some data to the
HP Desk XDS. The filename of the report file is written to the filename
parameter, a subject is written to the subject parameter and a flag
called text_type is set to 1.
The application then uses the ACTIVATE intrinsic to suspend itself (in
the MPE sense) and reactivates its other process--HP Desk. HP Desk
becomes active and checks the JCW HPDESKPROCCONTROL to find out what it
is supposed to do. In this example, the JCW is set to 4 which is the
Interrupt Mode that will copy an MPE file to the user's Work Area. HP
Desk obtains the filename to copy from the XDS and notes that the report
file should be treated as a text file (due to the text_type flag being
set). HP Desk then copies the file into the Work Area using the subject
provided in the XDS (since that is what Interrupt Mode 4 commands it to
do). When it has done this HP Desk sets the JCW HPDESKERR to 0 if
everything worked correctly, or to an error value if not. Finally HP
Desk reactivates the application and suspends itself.
The application program then becomes active and checks the value of the
HPDESKERR JCW. If it is non-zero, the application should report this and
attempt error handling, otherwise it terminates.
Finally control returns to HP Desk. When the user enters the Work Area
(unless already there) the report will be found ready for use in HP Desk.
MPE/iX 5.0 Documentation