Talk About Network



Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Mac > Mac Programmer Help > Power Off Scree...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 1 Topic 3737 of 3794
Post > Topic >>

Power Off Screen

by zon7 <zon7mail@[EMAIL PROTECTED] > May 11, 2008 at 04:44 AM

Hi. I'm developing an application to control the sleep of your machine
(like insomniax).
The problem is that I can't find a way to power off the screen by
coding. I've found this code

	io_registry_entry_t r = IORegistryEntryFromPath(kIOMasterPortDefault,
"IOService:/IOResources/IODisplayWrangler");
	if(!r) return;
	int err = IORegistryEntrySetCFProperty(r, CFSTR("IORequestIdle"),
kCFBooleanTrue);
	IOObjectRelease(r);

On my Macbook 10.5 and other 10.4 it works. But on a Powerbook it
causes a Kernel Panic.
Is there any other way to do it?
Thanks




 1 Posts in Topic:
Power Off Screen
zon7 <zon7mail@[EMAIL   2008-05-11 04:44:42 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Fri Jul 4 16:46:50 CDT 2008.