handing shutdown
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