home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / sys / acorn / tech / 698 < prev    next >
Encoding:
Text File  |  1992-11-19  |  3.0 KB  |  63 lines

  1. Newsgroups: comp.sys.acorn.tech
  2. Path: sparky!uunet!pipex!warwick!dcs.warwick.ac.uk!thughes
  3. From: thughes@dcs.warwick.ac.uk (Tom Hughes)
  4. Subject: Re: Noticing when Shutdown is activated
  5. Message-ID: <1992Nov20.092549.4209@dcs.warwick.ac.uk>
  6. Sender: news@dcs.warwick.ac.uk (Network News)
  7. Nntp-Posting-Host: stone
  8. Organization: Department of Computer Science, Warwick University, England
  9. References: <BxytAB.8KB@newcastle.ac.uk> <1992Nov20.020639.10146@infodev.cam.ac.uk>
  10. Date: Fri, 20 Nov 1992 09:25:49 GMT
  11. Lines: 50
  12.  
  13. In article <1992Nov20.020639.10146@infodev.cam.ac.uk> crj10@phx.cam.ac.uk (Clive Jones) writes:
  14. >In article <BxytAB.8KB@newcastle.ac.uk>, unregistered@newcastle.ac.uk (Jason O'Broin) writes:
  15. >> In addition to this, I need to be able to distinguish between this and Exiting
  16. >> the desktop (ie. closing down the desktop is not the same as starting the
  17. >> shutdown procedure). Does anyone know the actual operations performed by
  18. >> shutdown. Ideally, I'd like to replace it completely.
  19. >
  20. >I believe the mechanism is almost identical between RiscOS3.1 and previous
  21. >versions, in terms of its external interface. The difference between the
  22. >shutdown dbox and merely leaving the desktop is slight.
  23. >
  24. >Basically, all tasks are first sent a PreQuit message (number 8). If none of
  25. >them respond, they're all sent Quit (0) messages. So - the former should be
  26. >handled if you want the opportunity to object to the shutdown, or the latter
  27. >can be handled if you just want to do something.
  28. >
  29. >Under RiscOS3, the PreQuit message *may* have a flag word at address 20 in
  30. >the message block (if the block is large enough). The bottom bit of this is set
  31. >if it's your application being quit, or clear if a shutdown is happening.
  32.  
  33. Right. I looked this up in the RiscOS 3 PRMs last night, and whilst
  34. the above info is correct, there are some new calls.
  35.  
  36. Firstly, there is a new messagem, Message_Shutdown (message 14) which
  37. I think is only issued on the portable when an enforced shutdown
  38. occurs (due to battery failure). I suspect this replaces the
  39. Message_PreQuit/Quit sequence, as applciations should try to save and
  40. exit gracefully when they receive it (accoring to the manuals).
  41.  
  42. Secondly, there are two service calls. These are Service_Shutdown
  43. (&7E) which is issued before a shutdown, and may be claimed to block
  44. the shutdown, and Service_ShutdownComplete (&80) which is issued after
  45. a shutdown is completed.
  46.  
  47. One other clever (?) way of replacing the shutdown sequence that I
  48. thought of is to install a post-filter on the task manager, watch for
  49. Shutdown/Exit being selected from the menu of ctrl-shift-F12 being
  50. pressed, and then mask these out from the task manager and do your own
  51. thing. This is however truly sick.
  52.  
  53. Tom.
  54.  
  55. ============================================================================
  56. Tom Hughes, CS3
  57.  
  58. thughes@uk.ac.warwick.dcs            57 Shakleton Road
  59. csugk@uk.ac.warwick.csv              Earlsdon
  60.                                      Coventry
  61. (0203) 673584                        CV5 6HT
  62. ============================================================================
  63.