views:

126

answers:

1

I need to be able to control brightness of my Windows CE 5.0 device.

I've found that there is an API function ExtEscape to do that ( http://msdn.microsoft.com/en-us/library/aa453063 ) but it needs a structure ContrastCmdInputParm (http://msdn.microsoft.com/en-us/library/Aa447689 ) as a parameter. Since ExtEscape is unmanaged, I cannot pass a .net structure.

What is the simplest way to call this function?

A: 

Before you go down this road, contact your OEM to see if they have an API for controlling backlight intensity. In my experience no one implements it via ExtEscape (I've not seen it even once). Generally if backlight adjustment is supported at all (sometimes it's not physiclaly possible on a device, sometimes it's not implemented by the OEM), then it has a proprietary API for adjusting it.

So again, contact your device OEM before going any further to avoid wasting your own time.

ctacke
My OEM provides a dll library to change the brightness, but I thought that it would be better to use something build in. If the ExtEscape function doesn't work with brightness in most devices, it doesn't make sense to use it.
mack369
I did some tests using brightness library from my OEM. When I change the brightness using this library everything works fine except that when system goes to one of the idle modes and then wake up, the brightness is overridden by a default value. Any idea how to workaround it? I need to be able to set the brightness pernamently.
mack369
Either ask your OEM to fix the library bugs/features that you are using or create an application that changes the brightness to your desired level in each system power state change.
Shaihi

related questions