Re: UpdateUsrActivity on 64-bits

Christiaan Hofman <[email protected]>
Newsgroups gmane.comp.macosx.devel
Message-ID <[email protected]>
On Sep 3, 2009, at 23:32, Kyle Sluder wrote:

> On Thu, Sep 3, 2009 at 12:59 PM, Christiaan  
> Hofman<[email protected]> wrote:
>> I am using the UpdateUsrActivity() function to prevent the computer  
>> from
>> sleeping at certain times. However when moving over to 64-bits I just
>> discovers that this function is not available for 64-bit, as the
>> OSServices/Power.h header is excluded for __LP64. Could anyone tell  
>> me what
>> the proper replacement is?
>
> I/O Kit.  See the I/O Kit Power Management release notes for a nice
> convenient application API that does exactly what you want:
> http://developer.apple.com/mac/library/releasenotes/Darwin/RN-IOKitPowerManagment/index.html
>
> --Kyle Sluder

Thanks Kyle, that works great.

Now I have a similar problem with SetSystemUIMode(). Even though the  
function is defined for 64-bits, the enums with possible arguments are  
not. It seems pretty stupid to have a function defined but not its  
possible arguments. Is that a known bug? And any way around?

Thanks,
Christiaan
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.