We are using C# .Net Compact Edition 3.5 with Windows Mobile 6.1 and not very familiar with C++ or Windows API calls. We need to programmatically change the battery idle/suspect time from whatever it's set (usually defaults to 3/5 minutes) to 15 minutes. I've found some examples online, but so far none of them work or I don't know how/can't find how to implement them because they're in C++ or have no explanation or context for running in C#.
int test = SystemParametersInfo(SPI_SETBATTERYIDLETIMEOUT, 15, null, 0); //15 seconds, to test it actually working
//test return 0
How can I, from .Net CE 3.5 in C#, change the battery timeout in Windows Mobile 6.1?
Thanks
Edit: The client requesting this application has requested this behavior specifically. They want a longer timeout during application execution and system default timeout when it's not running.