Hardware library

eshaulx

New Member
Licensed User
Longtime User
Hi,

I used the hardware lib to prevent idle mode,

I'm using SBC (Single board computer) from variscite.
It has windows CE6 installed.

but I got the following message:

Can't find an Entry Point 'SHIdleTimerReset' in PInvoke DLL 'aygshell.dll'

How can I solve it?

I saw a similar question but not a follow up.

thanks,
Erez Shaul
 

agraham

Expert
Licensed User
Longtime User
Windows Mobile is standardised but Windows CE is not so the manufacturer can implement whatever elements of the full OS that they choose. In your case they seem to have not included that functionality. The use of SHIdleTimerReset() is "To prevent the shell from reverting to the Home screen and locking the device, an application should call this function periodically" Does your device have a Home screen? If not then that is why that call is not present.

KeepAlive also calls SystemIdleTimerReset() - "This function resets a system timer that controls whether or not the device will automatically go into a suspended state."

If you are optimised compiling then you could try modifying Hardware.cs in the libraries folder by commenting out the call to SHIdleTimerReset() and leaving the call to SystemIdleTimerReset() and see if that does what you need.

B4X:
   public void KeepAlive()
   {
      [COLOR="Green"]//SHIdleTimerReset();
[/COLOR]      SystemIdleTimerReset();
   }
 

eshaulx

New Member
Licensed User
Longtime User
Thank you very much agraham !

I modified the Hardware.cs file according to your suggestion.
I no longer get an error message. but, unfortunately, the device still go into suspend state (Screen turn white after a few minutes)

Can you advice a different way to stop suspend state via basic4PPC?

Best regards,
Erez Shaul.
 
Top