Ross Boylan wrote: > I would like my application to get notice when the system sleeps, > hibernates, or wakes up. > http://msdn.microsoft.com/en-us/library/aa373196(VS.85).aspx > points me to RegisterPowerSettingNotification, but I do not see this in > the latest docs from ActiveState. MSDN only seems to provide a C++ > interface; I don't see any COM interface. > > I think this is new in Vista. Is there a way to do this from Python? >
It is new in Vista. You can certainly call this through ctypes. It's a simple API. Be sure to wrap the ctypes call in a try/except, in case you happen to run on XP. -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. _______________________________________________ python-win32 mailing list python-win32@python.org http://mail.python.org/mailman/listinfo/python-win32