On Nov 5, 2008, at 20:40 , Maggie Zhang wrote:

Is there any Mac OS API that will tell whether the OS is shutting down or
restarting?

Yes, but it depends on what you want to do... the basic API is in the User Space portion of the IOKit Framework. See this tech q&a and the IOKit Framework documentation
for more info:

http://developer.apple.com/qa/qa2004/qa1340.html
http://developer.apple.com/documentation/Darwin/Reference/IOKit/index.html

P.S. - the tech q&a is talking about registering for sleep/wake events but the process for shutdown events is the same so you can use it as a base reference.

J

Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to