• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
handing shutdown
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

handing shutdown


  • Subject: handing shutdown
  • From: Pavel <email@hidden>
  • Date: Wed, 28 Nov 2001 18:55:43 +0400

I'm looking for a way to customize logout behavior in MacOS X.
Currently i'm trying to implement this via Cocoa app that runs as daemon,
but so far i failed to handle kAEQuitApplication event using
InstallApplicationEventHandler:

// code begins
EventHandlerRef handlerRef;
OSStatus err;
EventTypeSpec eventTypes[1];

eventTypes[0].eventClass = kCoreEventClass;
eventTypes[0].eventKind = kAEQuitApplication;
err = InstallApplicationEventHandler(NewEventHandlerUPP(MyQuitHandler),
1, eventTypes, 0, &handlerRef);

RunApplicationEventLoop();
// code ends

The handler isn't called at all, the application simply quits.

Thanks,
Pavel


  • Follow-Ups:
    • Re: handing shutdown
      • From: Eric Schlegel <email@hidden>
  • Prev by Date: Creating a thumbnail without Photshop. How?
  • Next by Date: Re: Equivalent to gethrtime()
  • Previous by thread: Creating a thumbnail without Photshop. How?
  • Next by thread: Re: handing shutdown
  • Index(es):
    • Date
    • Thread