On Wed, Jan 21, 2009 at 6:20 PM, Lars Munch <l...@segv.dk> wrote:
> Hi
>
> Attached patch adds the power management header "pm.h" based on
> information from: http://msdn.microsoft.com/en-us/library/aa909892.aspx
>
> All these functions are in coredll
>
> ...but the patch has two issues (one show stopper).
>
> 1. issue (the show stopper) :
>
> The function SetSystemPowerState is declared in winbase.h which is
> correct for win32 systems but not for wince, so I moved the wince
> declaration to pm.h and added a "#if (_WIN32_WINNT >= 0x0400)" guard to
> winbase.h. Now the problem is that the guard in winbase.h does not work
> with arm-mingw32ce-gcc and I get:
>
> error: conflicting types for 'SetSystemPowerState'
>
> As far as I can tell _WIN32_WINNT is not defined anywhere with
> arm-mingw32ce-gcc
>
> arm-mingw32ce-gcc -dM -E - < /dev/null |grep WINNT
> #define __WINNT 1
> #define __WINNT__ 1
> #define WINNT 1
>
> so why is the _WIN32_WINNT guard not working? I am missing something?
>
> 2. issue (non show stopper):
>
> pm.h are missing some defines e.g POWER_NAME, POWER_FORCE and
> POWER_STATE_XYZ but I do not know the correct values and I cannot find
> them on MSDN. If anyone can pitch in on the missing definions that would
> be very good.
>
Hi Lars,

#define POWER_NAME              (DWORD)(0x00000001)
#define POWER_FORCE             (DWORD)(0x00001000)

This defines are for win ce 6.0.
I can't find value for POWER_STATE_XYZ

regards,


-- 
Nicolas Aguirre
Mail: aguirre.nico...@gmail.com
Web: http://www.digital-corner.org

------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
Cegcc-devel mailing list
Cegcc-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cegcc-devel

Reply via email to