Page 1 of 2

Stop automatic power off of a Pocket-PC ?

PostPosted: Jul 17, 2006 @ 9:48am
by directdance

PostPosted: Jul 18, 2006 @ 9:44am
by directdance
... I have found a WinApi function, SystemIdleTimerReset wich has to be called every minute for preventing shutting down the PPC.

Is it possible to call a WinApi function using PPL?

And if so, it would be very nice if anybody can give me an example ;-)

Many thanks,
DirectDance

PostPosted: Jul 18, 2006 @ 1:31pm
by PointOfLight
You want to do the following -

#declare SystemIdleTimerReset "dllname.dll" SystemIdleTimerReset #InputParams #OutputParms

or

#declareapi {everything else the same}

I will be perfectly honest in that I don't know what the difference between #declare and #declareapi is, but one of those should work for you. I hope this makes sense.

PostPosted: Jul 18, 2006 @ 2:35pm
by directdance
Hi there,

thanks for your hint, but my problem is, that the function SystemIdleTimerReset is a content of the winapi. I do not know a dll file. Is it possible, that the winapi is always loaded like a standard api?

Sorry, I do not really have skills in this :cry:

Thanks,
DirectDance

PostPosted: Jul 18, 2006 @ 3:08pm
by PointOfLight

PostPosted: Jul 18, 2006 @ 3:30pm
by directdance

PostPosted: Jul 18, 2006 @ 3:45pm
by PointOfLight

PostPosted: Jul 18, 2006 @ 3:50pm
by directdance

PostPosted: Jul 18, 2006 @ 4:52pm
by PointOfLight

PostPosted: Jul 18, 2006 @ 5:02pm
by kornalius

It is working now!

PostPosted: Jul 18, 2006 @ 9:01pm
by directdance

PostPosted: Jul 18, 2006 @ 9:05pm
by PointOfLight

PostPosted: Jul 19, 2006 @ 5:17pm
by kornalius
Yep, #ifdef #endif is really your friend for multiplatform development.

PostPosted: Jul 19, 2006 @ 6:49pm
by bmanske

PostPosted: Jul 19, 2006 @ 6:59pm
by PointOfLight