<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>fengcool.com &#187; .net-compact-framework</title>
	<atom:link href="http://www.fengcool.com/tag/net-compact-framework/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.fengcool.com</link>
	<description>Just another WordPress weblog</description>
	<lastBuildDate>Mon, 31 May 2010 02:22:36 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>BackLight Always On</title>
		<link>http://www.fengcool.com/2007/07/keep-backlight-on-for-your-application-on-windows-mobile-smartphones/</link>
		<comments>http://www.fengcool.com/2007/07/keep-backlight-on-for-your-application-on-windows-mobile-smartphones/#comments</comments>
		<pubDate>Wed, 25 Jul 2007 21:45:12 +0000</pubDate>
		<dc:creator>Nelson</dc:creator>
				<category><![CDATA[Windows Mobile]]></category>
		<category><![CDATA[.net-compact-framework]]></category>
		<category><![CDATA[dllimport]]></category>
		<category><![CDATA[smartphone]]></category>

		<guid isPermaLink="false">http://www.fengcool.com/2007/07/keep-backlight-on-for-your-application-on-windows-mobile-smartphones/</guid>
		<description><![CDATA[How to keep backLight On For Your Application On Windows Mobile Smartphones]]></description>
			<content:encoded><![CDATA[<p>WIN32 APIs you needed to call:<br />
<code><br />
[DllImport("coredll.dll")]<br />
private static extern IntPtr SetPowerRequirement(string pvDevice, PowerState DeviceState, int DeviceFlags, IntPtr pvSystemState, int StateFlags);</code><br />
<code><br />
[DllImportAttribute("coredll.Dll")]<br />
private static extern int ReleasePowerRequirement(IntPtr hPowerReq);</code></p>
<p>Structure you will need:</p>
<p><code><br />
public enum PowerState<br />
{<br />
PWRUNSPECIFIED = -1,<br />
FULL = 0,<br />
LOW = 1,<br />
STANDBY = 2,<br />
SLEEP = 3,<br />
OFF = 4,<br />
PWRMAX = 5<br />
}<br />
</code></p>
<p>Actual methods:<br />
IntPtr handle = SetPowerRequirement(&#8221;BKL1:&#8221;, level, 1, IntPtr.Zero, 0);</p>
<p>Note:<br />
It works on Windows Mobile 5.0 with .net Compact Framework 1.0 or .net Compact Framework 2.0.</p>
<a rel="external nofollow" class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fwww.fengcool.com%2F2007%2F07%2Fkeep-backlight-on-for-your-application-on-windows-mobile-smartphones%2F&amp;linkname=BackLight%20Always%20On"><img src="http://www.fengcool.com/wp-content/plugins/add-to-any/share_save_120_16.png" width="120" height="16" alt="Share/Save/Bookmark"/></a>]]></content:encoded>
			<wfw:commentRss>http://www.fengcool.com/2007/07/keep-backlight-on-for-your-application-on-windows-mobile-smartphones/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
