home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / sys / mac / programm / 19930 < prev    next >
Encoding:
Internet Message Format  |  1992-12-16  |  1.1 KB

  1. Path: sparky!uunet!enterpoop.mit.edu!eru.mt.luth.se!kth.se!dront.nada.kth.se!d88-jwa
  2. From: d88-jwa@dront.nada.kth.se (Jon Wtte)
  3. Newsgroups: comp.sys.mac.programmer
  4. Subject: Re: Detecting reboot or startup
  5. Message-ID: <1992Dec16.132825.13170@kth.se>
  6. Date: 16 Dec 92 13:28:25 GMT
  7. References: <cmcclary-151292113831@mcclary-mac.ucs.indiana.edu>
  8. Sender: usenet@kth.se (Usenet)
  9. Organization: Royal Institute of Technology, Stockholm, Sweden
  10. Lines: 20
  11. Nntp-Posting-Host: dront.nada.kth.se
  12.  
  13. In <cmcclary-151292113831@mcclary-mac.ucs.indiana.edu> cmcclary@ucs.indiana.edu (Charles McClary) writes:
  14.  
  15. >What is the best/preferred method for an application to detect if the
  16. >system has been rebooted or restarted since it (the application) last ran.
  17.  
  18. Install a gestalt selector with your own signature as selector code.
  19.  
  20. If it's there, the application run previously during this "session."
  21. The selector code should reside in the system heap, and could simply
  22. return a 0 as result; you would test for presence, not return code.
  23.  
  24. Cheers,
  25.  
  26.                         / h+
  27.  
  28. -- 
  29.  -- Jon W{tte, h+@nada.kth.se, Mac Hacker Deluxe --
  30.  
  31.    Nothing crashes like a Macintosh.
  32.                      -- Guy Kawasaki
  33.