Re: SystemIdleTimerReset() question



You need to put the backlight/screen into D0 full power mode, this should
work as well:

SystemIdleTimerReset();

SetSystemPowerState(NULL, POWER_STATE_ON, POWER_FORCE);


--
--
GraemeW
Web - http://www.bytesnap.co.uk
Blog - http://ce4all.blogspot.com


"Sagaert Johan" <REMOVEsagaert_j@xxxxxxxxxxx> wrote in message
news:%23Grkd1tpIHA.4816@xxxxxxxxxxxxxxxxxxxxxxx
Hi

If i call SystemIdleTimerReset() should the backlight then turn on again
?
It tried calling this api but it does not turn on the backlight.
(could this be a bug on the OS (embedded winCE5 module)
I guess it will only prevent the device going into suspend mode.

I want to turn on the backlight again after it went off .

I triied the ExtEscape(dc, SETPOWERMANAGEMENT,.. function , but it does
not enable / disable the backlight.

It only seems to disable/enable the bitstream and framing signals on the
TFT hardware .
Maybe this is a bug in the OS image ? ( I am getting convinced since the
same code on another brnad of CE5 device seems to perform as expected.)



Any hints ?

Johan

included : source code of my managed wrapper

using System;

using System.Collections.Generic;

using System.ComponentModel;

using System.Data;

using System.Drawing;

using System.Text;

using System.Windows.Forms;

using System.Runtime.InteropServices;

using System.Runtime.InteropServices.ComTypes;

using System.Runtime;

namespace Utilitys

{

public class Tools

{

const int SETPOWERMANAGEMENT = 6147;

const uint VideoPowerOff = 4;

const uint VideoPowerOn = 1;

[StructLayout(LayoutKind.Sequential)]

private struct VIDEO_POWER_MANAGEMENT

{

public uint Length;

public uint DPMSVersion;

public uint PowerState;

} ;

public static void DisplayPower(bool poweron)

{

VIDEO_POWER_MANAGEMENT vpm;

vpm.Length = 12;

vpm.PowerState = poweron == true ? VideoPowerOn : VideoPowerOff;

vpm.DPMSVersion = 0x0001;

IntPtr dc;

dc = GetDC(IntPtr.Zero);

IntPtr si = Marshal.AllocHGlobal(Marshal.SizeOf(vpm));

Marshal.StructureToPtr(vpm, si, false);

ExtEscape(dc, SETPOWERMANAGEMENT, Marshal.SizeOf(vpm), si, 0,
IntPtr.Zero);

Marshal.FreeHGlobal(si);

}

[DllImport(@"coredll.dll")]

public static extern int ExtEscape(IntPtr hdc, int escfunc, int structlen,
IntPtr instruct, int szoutput, IntPtr lpod);

[DllImport(@"coredll.dll")]

public static extern IntPtr GetDC(IntPtr hdc);

}

}







.



Relevant Pages

  • Re: SystemIdleTimerReset() question
    ... backlight depends on BSP implementation. ... public uint DPMSVersion; ... IntPtr si = Marshal.AllocHGlobal); ... public static extern int ExtEscape(IntPtr hdc, int escfunc, int ...
    (microsoft.public.windowsce.embedded)
  • SystemIdleTimerReset() question
    ... If i call SystemIdleTimerResetshould the backlight then turn on again? ... public uint DPMSVersion; ... IntPtr si = Marshal.AllocHGlobal); ... public static extern int ExtEscape(IntPtr hdc, int escfunc, int structlen, ...
    (microsoft.public.windowsce.embedded)
  • CryptSignMessage fails with unkown cryptographic algorithm
    ... public uint dwCertEncodingType; ... public IntPtr pbCertEncoded; ... public static extern int CryptVerifyMessageSignature( ...
    (microsoft.public.platformsdk.security)
  • RE: CryptSignMessage fails with unkown cryptographic algorithm
    ... public uint dwCertEncodingType; ... public IntPtr pbCertEncoded; ... public static extern int CryptVerifyMessageSignature( ...
    (microsoft.public.platformsdk.security)
  • Re: 8 bit image
    ... You fill out a BITMAPINFO structure which consists of a BITMAPINFOHEADER ... > IntPtr hReal = GetFocus; ... > public int biWidth; ... > public uint biCompression; ...
    (microsoft.public.dotnet.framework.drawing)