<?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>Windows CE Programming</title>
	<atom:link href="http://www.hjgode.de/wp/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.hjgode.de/wp</link>
	<description>Windows Mobile Development and usage</description>
	<lastBuildDate>Fri, 03 Feb 2012 08:53:20 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<!--CodeProjectFeeder channel--><category>CodeProject</category><generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Mobile Developement &#8211; RDP AutoLogin extended (version 4)</title>
		<link>http://www.hjgode.de/wp/2012/01/03/mobile-developement-rdp-autologin-extended-version-4/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=mobile-developement-rdp-autologin-extended-version-4</link>
		<comments>http://www.hjgode.de/wp/2012/01/03/mobile-developement-rdp-autologin-extended-version-4/#comments</comments>
		<pubDate>Tue, 03 Jan 2012 13:53:56 +0000</pubDate>
		<dc:creator>josef</dc:creator>
				<category><![CDATA[CodeProject]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[rdp]]></category>
		<category><![CDATA[remote desktop mobile]]></category>
		<category><![CDATA[windows mobile]]></category>
		<category><![CDATA[Windows Mobile 6]]></category>

		<guid isPermaLink="false">http://www.hjgode.de/wp/?p=1299</guid>
		<description><![CDATA[Hello on the wish of the one or other user I extended the RDP AutoLogin code and we now reached level 4. The new code simply has only one extension, it supports the color depth selection. Also the color depth and other settings are visible on the dialog of Remote Desktop Mobile, the settings itself [...]]]></description>
			<content:encoded><![CDATA[<p>Hello</p>
<p>on the wish of the one or other user I extended the RDP AutoLogin code and we now reached level 4.</p>
<p>The new code simply has only one extension, it supports the color depth selection. Also the color depth and other settings are visible on the dialog of Remote Desktop Mobile, the settings itself are done via the Default.rdp file. But you are right, RDP_AutoLogin also controls some of the dialog items directly.</p>
<div id="wpshdo_1" class="wp-synhighlighter-outer"><div id="wpshdt_1" class="wp-synhighlighter-expanded"><table border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_1"></a><a id="wpshat_1" class="wp-synhighlighter-title" href="#codesyntax_1"  onClick="javascript:wpsh_toggleBlock(1)" title="Click to show/hide code block">Source code</a></td><td align="right"><a href="#codesyntax_1" onClick="javascript:wpsh_code(1)" title="Show code only"><img border="0" style="border: 0 none" src="http://www.hjgode.de/wp/wp-content/plugins/wp-synhighlight/themes/default/images/code.png" /></a>&nbsp;<a href="#codesyntax_1" onClick="javascript:wpsh_print(1)" title="Print code"><img border="0" style="border: 0 none" src="http://www.hjgode.de/wp/wp-content/plugins/wp-synhighlight/themes/default/images/printer.png" /></a>&nbsp;<a href="http://www.hjgode.de/wp/wp-content/plugins/wp-synhighlight/About.html" target="_blank" title="Show plugin information"><img border="0" style="border: 0 none" src="http://www.hjgode.de/wp/wp-content/plugins/wp-synhighlight/themes/default/images/info.gif" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_1" class="wp-synhighlighter-inner" style="display: block;"><pre class="text" style="font-family:monospace;"><ol><li class="li1"><div class="de1">...</div></li><li class="li1"><div class="de1">Domain:s:</div></li><li class="li1"><div class="de1">ColorDepthID:i:3</div></li><li class="li1"><div class="de1">ScreenStyle:i:0</div></li><li class="li1"><div class="de1">DesktopWidth:i:640</div></li><li class="li1"><div class="de1">DesktopHeight:i:480</div></li><li class="li1"><div class="de1">UserName:s:rdesktop</div></li><li class="li1"><div class="de1">...</div></li><li class="li1"><div class="de1">ServerName:s:192.168.128.5</div></li><li class="li1"><div class="de1">SavePassword:i:1</div></li><li class="li1"><div class="de1">...</div></li></ol></pre></div></div>
<p>The color depth setting supports two modes, 8 Bit with 256b colors (ColorDepthID:i:1) and 16 Bit with ~65000 colors (ColorDepthID:i:3).</p>
<div id="wpshdo_2" class="wp-synhighlighter-outer"><div id="wpshdt_2" class="wp-synhighlighter-expanded"><table border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_2"></a><a id="wpshat_2" class="wp-synhighlighter-title" href="#codesyntax_2"  onClick="javascript:wpsh_toggleBlock(2)" title="Click to show/hide code block">Source code</a></td><td align="right"><a href="#codesyntax_2" onClick="javascript:wpsh_code(2)" title="Show code only"><img border="0" style="border: 0 none" src="http://www.hjgode.de/wp/wp-content/plugins/wp-synhighlight/themes/default/images/code.png" /></a>&nbsp;<a href="#codesyntax_2" onClick="javascript:wpsh_print(2)" title="Print code"><img border="0" style="border: 0 none" src="http://www.hjgode.de/wp/wp-content/plugins/wp-synhighlight/themes/default/images/printer.png" /></a>&nbsp;<a href="http://www.hjgode.de/wp/wp-content/plugins/wp-synhighlight/About.html" target="_blank" title="Show plugin information"><img border="0" style="border: 0 none" src="http://www.hjgode.de/wp/wp-content/plugins/wp-synhighlight/themes/default/images/info.gif" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_2" class="wp-synhighlighter-inner" style="display: block;"><pre class="reg" style="font-family:monospace;"><ol><li class="li1"><div class="de1"><span class="geshi_registry_header">REGEDIT4</span></div></li><li class="li1"><div class="de1">&nbsp;</div></li><li class="li1"><div class="de1"><span class="br0">&#91;</span><span class="kw3">HKEY_LOCAL_MACHINE</span>\Software\RDP_autologin<span class="br0">&#93;</span></div></li><li class="li1"><div class="de1"><span class="geshi_variable">&quot;FitToScreen&quot;</span><span class="sy0">=</span><span class="st0">&quot;1&quot;</span></div></li><li class="li1"><div class="de1"><span class="geshi_variable">&quot;FullScreen&quot;</span><span class="sy0">=</span><span class="st0">&quot;1&quot;</span></div></li><li class="li1"><div class="de1"><span class="geshi_variable">&quot;Status&quot;</span><span class="sy0">=</span><span class="st0">&quot;connecting...&quot;</span></div></li><li class="li1"><div class="de1"><span class="geshi_variable">&quot;Save Password&quot;</span><span class="sy0">=</span><span class="st0">&quot;1&quot;</span></div></li><li class="li1"><div class="de1"><span class="geshi_variable">&quot;Domain&quot;</span><span class="sy0">=</span><span class="st0">&quot;&quot;</span></div></li><li class="li1"><div class="de1"><span class="geshi_variable">&quot;Password&quot;</span><span class="sy0">=</span><span class="st0">&quot;Intermec+2004&quot;</span></div></li><li class="li1"><div class="de1"><span class="geshi_variable">&quot;Username&quot;</span><span class="sy0">=</span><span class="st0">&quot;rdesktop&quot;</span></div></li><li class="li1"><div class="de1"><span class="geshi_variable">&quot;Computer&quot;</span><span class="sy0">=</span><span class="st0">&quot;192.168.0.130&quot;</span></div></li><li class="li1"><div class="de1"><span class="geshi_variable">&quot;DesktopWidth&quot;</span><span class="sy0">=</span>640</div></li><li class="li1"><div class="de1"><span class="geshi_variable">&quot;DesktopHeight&quot;</span><span class="sy0">=</span>480</div></li><li class="li1"><div class="de1"><span class="geshi_variable">&quot;startOnExit&quot;</span><span class="sy0">=</span><span class="st0">&quot;\\rdp_keepBusy.exe&quot;</span></div></li><li class="li1"><div class="de1"><span class="geshi_variable">&quot;execargs&quot;</span><span class="sy0">=</span><span class="st0">&quot;noRDPstart&quot;</span></div></li><li class="li1"><div class="de1"><span class="geshi_variable">&quot;UseMouseClick&quot;</span><span class="sy0">=</span>&quot;0&quot;	//added with version 3 to switch between mouse and keyboard simulation</div></li><li class="li1"><div class="de1"><span class="geshi_variable">&quot;ColorDepth&quot;</span><span class="sy0">=</span>1		//added with version 4 to enable switching between 8 and 16 Bit colors</div></li></ol></pre></div></div>
<p>The code changes are small. Some code addition to read the value from the registry and some to write the rdp file:</p>
<div id="wpshdo_3" class="wp-synhighlighter-outer"><div id="wpshdt_3" class="wp-synhighlighter-expanded"><table border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_3"></a><a id="wpshat_3" class="wp-synhighlighter-title" href="#codesyntax_3"  onClick="javascript:wpsh_toggleBlock(3)" title="Click to show/hide code block">Source code</a></td><td align="right"><a href="#codesyntax_3" onClick="javascript:wpsh_code(3)" title="Show code only"><img border="0" style="border: 0 none" src="http://www.hjgode.de/wp/wp-content/plugins/wp-synhighlight/themes/default/images/code.png" /></a>&nbsp;<a href="#codesyntax_3" onClick="javascript:wpsh_print(3)" title="Print code"><img border="0" style="border: 0 none" src="http://www.hjgode.de/wp/wp-content/plugins/wp-synhighlight/themes/default/images/printer.png" /></a>&nbsp;<a href="http://www.hjgode.de/wp/wp-content/plugins/wp-synhighlight/About.html" target="_blank" title="Show plugin information"><img border="0" style="border: 0 none" src="http://www.hjgode.de/wp/wp-content/plugins/wp-synhighlight/themes/default/images/info.gif" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_3" class="wp-synhighlighter-inner" style="display: block;"><pre class="cpp" style="font-family:monospace;"><ol><li class="li1"><div class="de1"><span class="kw4">void</span> readReg<span class="br0">&#40;</span><span class="br0">&#41;</span><span class="br0">&#123;</span></div></li><li class="li1"><div class="de1">...</div></li><li class="li1"><div class="de1">        <span class="co1">//ColorDepth new with version 4</span></div></li><li class="li1"><div class="de1">        <span class="kw1">if</span><span class="br0">&#40;</span>RegReadDword<span class="br0">&#40;</span>L<span class="st0">&quot;ColorDepth&quot;</span>, <span class="sy3">&amp;</span>dwTemp<span class="br0">&#41;</span> <span class="sy1">==</span> 0<span class="br0">&#41;</span></div></li><li class="li1"><div class="de1">            dwColorDepth<span class="sy1">=</span>dwTemp<span class="sy4">;</span></div></li><li class="li1"><div class="de1">...</div></li><li class="li1"><div class="de1"><span class="br0">&#125;</span></div></li><li class="li1"><div class="de1"><span class="kw4">void</span> writeRDP<span class="br0">&#40;</span><span class="br0">&#41;</span><span class="br0">&#123;</span></div></li><li class="li1"><div class="de1">...</div></li><li class="li1"><div class="de1">			<span class="kw1">else</span> <span class="kw1">if</span><span class="br0">&#40;</span>wcsstr<span class="br0">&#40;</span>rdpLines<span class="br0">&#91;</span>c<span class="br0">&#93;</span>.<span class="me1">line</span>, L<span class="st0">&quot;ColorDepthID&quot;</span><span class="br0">&#41;</span><span class="sy3">!</span><span class="sy1">=</span><span class="kw2">NULL</span><span class="br0">&#41;</span><span class="br0">&#123;</span></div></li><li class="li1"><div class="de1">				wsprintf<span class="br0">&#40;</span>szTemp, rdpLines<span class="br0">&#91;</span>c<span class="br0">&#93;</span>.<span class="me1">line</span>, dwColorDepth<span class="br0">&#41;</span><span class="sy4">;</span>  <span class="co1">//3=HighColor(16Bit) or 1=(8Bit) color</span></div></li><li class="li1"><div class="de1">			<span class="br0">&#125;</span></div></li><li class="li1"><div class="de1">...</div></li><li class="li1"><div class="de1"><span class="br0">&#125;</span></div></li></ol></pre></div></div>
<p>Additionally I have added a new project to the solution to enable to set all the settings not only via the registry but using a GUI application. RDP_Autologin_Settings is born:</p>
<p><span id="more-1299"></span></p>
<p><a href="http://www.hjgode.de/wp/2012/01/03/mobile-developement-rdp-autologin-extended-version-4/clipboard01-2/" rel="attachment wp-att-1300"><img class="alignnone size-full wp-image-1300" title="Clipboard01" src="http://www.hjgode.de/wp/wp-content/uploads/2012/01/Clipboard01.gif" alt="" width="240" height="320" /></a>  <a href="http://www.hjgode.de/wp/2012/01/03/mobile-developement-rdp-autologin-extended-version-4/clipboard02-2/" rel="attachment wp-att-1301"><img class="alignnone size-full wp-image-1301" title="Clipboard02" src="http://www.hjgode.de/wp/wp-content/uploads/2012/01/Clipboard02.gif" alt="" width="240" height="320" /></a> <a href="http://www.hjgode.de/wp/2012/01/03/mobile-developement-rdp-autologin-extended-version-4/clipboard03/" rel="attachment wp-att-1302"><img class="alignnone size-full wp-image-1302" title="Clipboard03" src="http://www.hjgode.de/wp/wp-content/uploads/2012/01/Clipboard03.gif" alt="" width="240" height="320" /></a><a href="http://www.hjgode.de/wp/2012/01/03/mobile-developement-rdp-autologin-extended-version-4/clipboard04/" rel="attachment wp-att-1303"> <img class="alignnone size-full wp-image-1303" title="Clipboard04" src="http://www.hjgode.de/wp/wp-content/uploads/2012/01/Clipboard04.gif" alt="" width="240" height="320" /></a></p>
<p>As you see, there is also a small file browser integrated. The default OpenFile dialog of Compact Framework does not allow you to browse all directories, but only &#8220;\My Documents&#8221;.</p>
<p>RDP AutoLogin Settings Editor (exe): <b>DOWNLOAD:</b><a href="http://www.hjgode.de/wp/wp-content/plugins/download-monitor/download.php?id=150" title="Downloaded 33 times">RDP AutoLogin Settings editor</a> -  (Hits: 33, size: 10.45 kB)<br />
source (Visual Studio 2008 WM5 SDK project): <b>DOWNLOAD:</b><a href="http://www.hjgode.de/wp/wp-content/plugins/download-monitor/download.php?id=151" title="Downloaded 28 times">RDP AutoLogin Settings editor Source Code</a> -  (Hits: 28, size: 21.23 kB)</p>
<p>RDP_AutoLogin (exe): <b>DOWNLOAD:</b><a href="http://www.hjgode.de/wp/wp-content/plugins/download-monitor/download.php?id=152" title="Downloaded 30 times">RDP AutoLogin Executable</a> -  (Hits: 30, size: 6.78 kB)<br />
source (Visual Studio 2008 WM5 SDK project): <b>DOWNLOAD:</b><a href="http://www.hjgode.de/wp/wp-content/plugins/download-monitor/download.php?id=153" title="Downloaded 26 times">RDP AutoLogin Source Code</a> -  (Hits: 26, size: 56.85 kB)</p>
<p>RDP_KeepBusy (exe): <b>DOWNLOAD:</b><a href="http://www.hjgode.de/wp/wp-content/plugins/download-monitor/download.php?id=155" title="Downloaded 24 times">RDP KeepBusy (executable)</a> -  (Hits: 24, size: 3.17 kB)<br />
RDP_KeepBusy (vs2008 WM5 SDK project): <b>DOWNLOAD:</b><a href="http://www.hjgode.de/wp/wp-content/plugins/download-monitor/download.php?id=154" title="Downloaded 27 times">RDP KeepBusy Source Code</a> -  (Hits: 27, size: 12.92 kB)</p>
<p>Have fun</p>
<p>Josef</p>
<!-- Social Bookmarks BEGIN -->
<div class="social_bookmark">
<a><strong><em>Bookmark It</em></strong></a>
<br />
<div class="d">
<br />
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://del.icio.us/post?url=http%3A%2F%2Fwww.hjgode.de%2Fwp%2F2012%2F01%2F03%2Fmobile-developement-rdp-autologin-extended-version-4%2F&amp;title=Mobile+Developement+%26%238211%3B+RDP+AutoLogin+extended+%28version+4%29" rel="nofollow" title="Add to&nbsp;Del.icio.us"><img class="social_img" src="http://www.hjgode.de/wp/wp-content/plugins/social-bookmarks0/images/delicious.png" title="Add to&nbsp;Del.icio.us" alt="Add to&nbsp;Del.icio.us" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.hjgode.de%2Fwp%2F2012%2F01%2F03%2Fmobile-developement-rdp-autologin-extended-version-4%2F&amp;title=Mobile+Developement+%26%238211%3B+RDP+AutoLogin+extended+%28version+4%29" rel="nofollow" title="Add to&nbsp;digg"><img class="social_img" src="http://www.hjgode.de/wp/wp-content/plugins/social-bookmarks0/images/digg.png" title="Add to&nbsp;digg" alt="Add to&nbsp;digg" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.google.com/bookmarks/mark?op=edit&amp;output=popup&amp;bkmk=http%3A%2F%2Fwww.hjgode.de%2Fwp%2F2012%2F01%2F03%2Fmobile-developement-rdp-autologin-extended-version-4%2F&amp;title=Mobile+Developement+%26%238211%3B+RDP+AutoLogin+extended+%28version+4%29" rel="nofollow" title="Add to&nbsp;Google Bookmarks"><img class="social_img" src="http://www.hjgode.de/wp/wp-content/plugins/social-bookmarks0/images/google.png" title="Add to&nbsp;Google Bookmarks" alt="Add to&nbsp;Google Bookmarks" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.netscape.com/submit/?U=http%3A%2F%2Fwww.hjgode.de%2Fwp%2F2012%2F01%2F03%2Fmobile-developement-rdp-autologin-extended-version-4%2F&amp;T=Mobile+Developement+%26%238211%3B+RDP+AutoLogin+extended+%28version+4%29" rel="nofollow" title="Add to&nbsp;Netscape"><img class="social_img" src="http://www.hjgode.de/wp/wp-content/plugins/social-bookmarks0/images/netscape.png" title="Add to&nbsp;Netscape" alt="Add to&nbsp;Netscape" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.technorati.com/faves?add=http%3A%2F%2Fwww.hjgode.de%2Fwp%2F2012%2F01%2F03%2Fmobile-developement-rdp-autologin-extended-version-4%2F" rel="nofollow" title="Add to&nbsp;Technorati"><img class="social_img" src="http://www.hjgode.de/wp/wp-content/plugins/social-bookmarks0/images/technorati.png" title="Add to&nbsp;Technorati" alt="Add to&nbsp;Technorati" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://myweb2.search.yahoo.com/myresults/bookmarklet?u=http%3A%2F%2Fwww.hjgode.de%2Fwp%2F2012%2F01%2F03%2Fmobile-developement-rdp-autologin-extended-version-4%2F&amp;t=Mobile+Developement+%26%238211%3B+RDP+AutoLogin+extended+%28version+4%29" rel="nofollow" title="Add to&nbsp;Yahoo My Web"><img class="social_img" src="http://www.hjgode.de/wp/wp-content/plugins/social-bookmarks0/images/yahoo.png" title="Add to&nbsp;Yahoo My Web" alt="Add to&nbsp;Yahoo My Web" /></a>
<br />
</div>
</div>
<!-- Social Bookmarks END -->
]]></content:encoded>
			<wfw:commentRss>http://www.hjgode.de/wp/2012/01/03/mobile-developement-rdp-autologin-extended-version-4/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Windows Mobile &#8211; tasker2 runs and stops applications periodically</title>
		<link>http://www.hjgode.de/wp/2011/12/23/windows-mobile-tasker2-runs-and-stops-applications-periodically/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=windows-mobile-tasker2-runs-and-stops-applications-periodically</link>
		<comments>http://www.hjgode.de/wp/2011/12/23/windows-mobile-tasker2-runs-and-stops-applications-periodically/#comments</comments>
		<pubDate>Fri, 23 Dec 2011 13:11:16 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[CodeProject]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Utilities]]></category>
		<category><![CDATA[notification API]]></category>
		<category><![CDATA[periodically]]></category>
		<category><![CDATA[schedule]]></category>
		<category><![CDATA[tasker2]]></category>
		<category><![CDATA[windows mobile]]></category>

		<guid isPermaLink="false">http://www.hjgode.de/wp/?p=1286</guid>
		<description><![CDATA[Tasker2 is a tool to launch or kill applications periodically using windows mobile scheduler. It was born to control the running of agent software on windows mobile at specified times. The problem with the agent software was that it does not open/close connections only on usage times but all the time and the device&#8217;s battery [...]]]></description>
			<content:encoded><![CDATA[<p>Tasker2 is a tool to launch or kill applications periodically using windows mobile scheduler. It was born to control the running of agent software on windows mobile at specified times. The problem with the agent software was that it does not open/close connections only on usage times but all the time and the device&#8217;s battery was drain very fast. We decided to write a helper that would launch and kill the agent to have it running only within a defined time frame.</p>
<h2>Background process</h2>
<p>We could have written a background process to run external tasks periodically. But the main disadvantage of timers and threads in background processes is that they do not run, if the device is in suspend mode.<br />
To ensure that tasks will be launched also if the device is sleeping, we decided to use the windows mobile scheduler. There are functions inside the notification API to create notifications that will run an application at a specified time. This is what we call a schedule.</p>
<h2>The scheduler (notification API)</h2>
<p>After a timed schedule has been done by the scheduler, the schedule is removed from the notification database. If you like to have a periodic schedule, you have to ensure that a new schedule is created inside your code.</p>
<h2>Pitfalls</h2>
<p>During development we found many pitfalls in conjunction with the windows mobile scheduler. This is why I decided to write this post.</p>
<h2>The tasks</h2>
<p>Tasker2 is a console application without any GUI but it will write a log with all you need to know. Tasker2 supports up to ten tasks. A task is defined using the registry. Every task has an entry for start and stop times, the application to control, an interval for the schedule and a flag for control if a task is only to be run on external power:</p>
<pre>REGEDIT4

[HKLM\Software\Tasker\Task1]
"active":DWORD=1
"exe":="\Windows\fexplore.exe"
"arg":="\My Documents"
"start":="1423"
"stop":="1523"
"interval":="2400"
"startOnAConly":DWORD=0;</pre>
<p><strong>active</strong>: if active is 0, tasker2 will not kill or start the process<br />
<strong>exe</strong>: name of the process executable to start or kill<br />
<strong>arg</strong>: arguments to be when launching the executable<br />
<strong>start</strong>: when to start the executable the next time<br />
<strong>stop</strong>: when to kill the process the next time<br />
<strong>interval</strong>: when a start or kill has been executed, tasker2 will create a new schedule using this interval. If the interval is &#8220;0010&#8243;, the start process will be scheduled for every 10 minutes.<br />
<strong>startOnAConly</strong>: if 1 and when a process has to be started, the process will only be started if the device is on external power</p>
<h2>The scheduler</h2>
<p>First, tasker2 is normally only launched one time manually and all future calls are made by the scheduler. Tasker2 will clear and schedule all planned tasks as defined in the registry if it is launched without arguments.</p>
<p><a href="http://www.hjgode.de/wp/2011/12/23/windows-mobile-tasker2-runs-and-stops-applications-periodically/notification-schedules/" rel="attachment wp-att-1287"><img class="alignnone size-full wp-image-1287" title="notification-schedules" src="http://www.hjgode.de/wp/wp-content/uploads/2011/12/notification-schedules.gif" alt="" width="320" height="240" /></a></p>
<p><span id="more-1286"></span>The scheduler is a task manager running all the time in windows mobile. If a timed schedule is reached, the scheduler will launch the specified application, see also <a href="http://www.hjgode.de/wp/2009/07/14/howto-run-an-application-periodically/">here</a> . This will also work if the device is in suspend mode (sleeps). The scheduler can also fire on special events like time or hardware changes (ON_RS232_CONNECT for example). See also my post <a href="http://www.hjgode.de/wp/2010/03/06/irunatevent/">here</a> [http://www.hjgode.de/wp/2010/03/06/irunatevent/].</p>
<h2>Theory of operation</h2>
<p>Tasker2 uses command line arguments to control itself. The scheduler launches tasker2 with the specified arguments and tasker2 will then run or kill the defined task.</p>
<p><a href="http://www.hjgode.de/wp/2011/12/23/windows-mobile-tasker2-runs-and-stops-applications-periodically/tasker-function/" rel="attachment wp-att-1288"><img class="alignnone size-full wp-image-1288" title="tasker-function" src="http://www.hjgode.de/wp/wp-content/uploads/2011/12/tasker-function.gif" alt="" width="800" height="502" /></a></p>
<h2>Delayed schedules (pitfall 1)</h2>
<p>If your device supports a real power down, the scheduler will not awake the device and is not able to launch the defined schedules. When the device is later powered on, it will schedule all past schedules at once. This is what we call a &#8216;delayed schedule&#8217; and a flooding of launches. Flooding in the mean of many schedules of tasker2 occurring at the same time for past tasks.<br />
To avoid concurrent changes to the registry and scheduler entries, tasker2 uses a mutex to ensure only one instance is continuing execution. Subsequent instances will wait for existing instances before they do there work.</p>
<div id="wpshdo_4" class="wp-synhighlighter-outer"><div id="wpshdt_4" class="wp-synhighlighter-expanded"><table border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_4"></a><a id="wpshat_4" class="wp-synhighlighter-title" href="#codesyntax_4"  onClick="javascript:wpsh_toggleBlock(4)" title="Click to show/hide code block">Source code</a></td><td align="right"><a href="#codesyntax_4" onClick="javascript:wpsh_code(4)" title="Show code only"><img border="0" style="border: 0 none" src="http://www.hjgode.de/wp/wp-content/plugins/wp-synhighlight/themes/default/images/code.png" /></a>&nbsp;<a href="#codesyntax_4" onClick="javascript:wpsh_print(4)" title="Print code"><img border="0" style="border: 0 none" src="http://www.hjgode.de/wp/wp-content/plugins/wp-synhighlight/themes/default/images/printer.png" /></a>&nbsp;<a href="http://www.hjgode.de/wp/wp-content/plugins/wp-synhighlight/About.html" target="_blank" title="Show plugin information"><img border="0" style="border: 0 none" src="http://www.hjgode.de/wp/wp-content/plugins/wp-synhighlight/themes/default/images/info.gif" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_4" class="wp-synhighlighter-inner" style="display: block;"><pre class="cpp" style="font-family:monospace;"><ol><li class="li1"><div class="de1"><span class="co1">//##################### dont run if already running #############################</span></div></li><li class="li1"><div class="de1">	nclog<span class="br0">&#40;</span>L<span class="st0">&quot;Checking for Mutex (single instance allowed only)...<span class="es1">\n</span>&quot;</span><span class="br0">&#41;</span><span class="sy4">;</span></div></li><li class="li1"><div class="de1">&nbsp;</div></li><li class="li1"><div class="de1">	hMutex<span class="sy1">=</span>CreateMutex<span class="br0">&#40;</span><span class="kw2">NULL</span>, TRUE, MY_MUTEX<span class="br0">&#41;</span><span class="sy4">;</span></div></li><li class="li1"><div class="de1">	<span class="kw1">if</span><span class="br0">&#40;</span>hMutex<span class="sy1">==</span><span class="kw2">NULL</span><span class="br0">&#41;</span><span class="br0">&#123;</span></div></li><li class="li1"><div class="de1">		<span class="co1">//this should never happen</span></div></li><li class="li1"><div class="de1">		nclog<span class="br0">&#40;</span>L<span class="st0">&quot;Error in CreateMutex! GetLastError()=%i<span class="es1">\n</span>&quot;</span>, GetLastError<span class="br0">&#40;</span><span class="br0">&#41;</span><span class="br0">&#41;</span><span class="sy4">;</span></div></li><li class="li1"><div class="de1">		nclog<span class="br0">&#40;</span>L<span class="st0">&quot;-------- END -------<span class="es1">\n</span>&quot;</span><span class="br0">&#41;</span><span class="sy4">;</span></div></li><li class="li1"><div class="de1">		<span class="kw1">return</span> <span class="sy2">-</span><span class="nu0">99</span><span class="sy4">;</span></div></li><li class="li1"><div class="de1">	<span class="br0">&#125;</span></div></li><li class="li1"><div class="de1">	DWORD dwLast <span class="sy1">=</span> GetLastError<span class="br0">&#40;</span><span class="br0">&#41;</span><span class="sy4">;</span></div></li><li class="li1"><div class="de1">	<span class="kw1">if</span><span class="br0">&#40;</span>dwLast<span class="sy1">==</span> ERROR_ALREADY_EXISTS<span class="br0">&#41;</span><span class="br0">&#123;</span><span class="co1">//mutex already exists, wait for mutex release</span></div></li><li class="li1"><div class="de1">		nclog<span class="br0">&#40;</span>L<span class="st0">&quot;<span class="es1">\t</span>Attached to existing mutex<span class="es1">\n</span>&quot;</span><span class="br0">&#41;</span><span class="sy4">;</span></div></li><li class="li1"><div class="de1">		nclog<span class="br0">&#40;</span>L<span class="st0">&quot;................ Waiting for mutex release......<span class="es1">\n</span>&quot;</span><span class="br0">&#41;</span><span class="sy4">;</span></div></li><li class="li1"><div class="de1">		WaitForSingleObject<span class="br0">&#40;</span> hMutex, INFINITE <span class="br0">&#41;</span><span class="sy4">;</span></div></li><li class="li1"><div class="de1">		nclog<span class="br0">&#40;</span>L<span class="st0">&quot;++++++++++++++++ Mutex released. +++++++++++++++<span class="es1">\n</span>&quot;</span><span class="br0">&#41;</span><span class="sy4">;</span></div></li><li class="li1"><div class="de1">	<span class="br0">&#125;</span></div></li><li class="li1"><div class="de1">	<span class="kw1">else</span><span class="br0">&#123;</span></div></li><li class="li1"><div class="de1">		nclog<span class="br0">&#40;</span>L<span class="st0">&quot;<span class="es1">\t</span>Created new mutex<span class="es1">\n</span>&quot;</span><span class="br0">&#41;</span><span class="sy4">;</span></div></li><li class="li1"><div class="de1">	<span class="br0">&#125;</span></div></li><li class="li1"><div class="de1">&nbsp;</div></li><li class="li1"><div class="de1">	<span class="co1">//##################### dont run if already running #############################</span></div></li></ol></pre></div></div>
<p>On a delayed, flooding schedule ALL pending tasks are scheduled and possibly a Time_Changed string is sent to the pending tasks. This flooding will be serialized as tasker2 waits for existing tasker2 instances.</p>
<h2>Time and time zone changes (pitfall 2)</h2>
<p>When the time is changed on the device, the scheduler will inform all timed tasks. Tasker2 must then recalculate new schedules based on current local time. The scheduler launches the defined applications with the TIME_CHANGED string as argument.</p>
<div id="wpshdo_5" class="wp-synhighlighter-outer"><div id="wpshdt_5" class="wp-synhighlighter-expanded"><table border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_5"></a><a id="wpshat_5" class="wp-synhighlighter-title" href="#codesyntax_5"  onClick="javascript:wpsh_toggleBlock(5)" title="Click to show/hide code block">Source code</a></td><td align="right"><a href="#codesyntax_5" onClick="javascript:wpsh_code(5)" title="Show code only"><img border="0" style="border: 0 none" src="http://www.hjgode.de/wp/wp-content/plugins/wp-synhighlight/themes/default/images/code.png" /></a>&nbsp;<a href="#codesyntax_5" onClick="javascript:wpsh_print(5)" title="Print code"><img border="0" style="border: 0 none" src="http://www.hjgode.de/wp/wp-content/plugins/wp-synhighlight/themes/default/images/printer.png" /></a>&nbsp;<a href="http://www.hjgode.de/wp/wp-content/plugins/wp-synhighlight/About.html" target="_blank" title="Show plugin information"><img border="0" style="border: 0 none" src="http://www.hjgode.de/wp/wp-content/plugins/wp-synhighlight/themes/default/images/info.gif" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_5" class="wp-synhighlighter-inner" style="display: block;"><pre class="cpp" style="font-family:monospace;"><ol><li class="li1"><div class="de1"><span class="kw1">else</span> <span class="kw1">if</span><span class="br0">&#40;</span>wcsicmp<span class="br0">&#40;</span>argv<span class="br0">&#91;</span>1<span class="br0">&#93;</span>, APP_RUN_AFTER_TIME_CHANGE<span class="br0">&#41;</span><span class="sy1">==</span>0 <span class="sy3">||</span> wcsicmp<span class="br0">&#40;</span>argv<span class="br0">&#91;</span><span class="nu0">1</span><span class="br0">&#93;</span>, APP_RUN_AFTER_TZ_CHANGE<span class="br0">&#41;</span><span class="sy1">==</span><span class="nu0">0</span><span class="br0">&#41;</span><span class="br0">&#123;</span></div></li><li class="li1"><div class="de1">			nclog<span class="br0">&#40;</span>L<span class="st0">&quot;got '%s' signaled<span class="es1">\n</span>&quot;</span>, argv<span class="br0">&#91;</span>1<span class="br0">&#93;</span><span class="br0">&#41;</span><span class="sy4">;</span></div></li><li class="li1"><div class="de1">				<span class="co1">//better to reread the current time we work with, possibly we have been blocked</span></div></li><li class="li1"><div class="de1">				g_tmCurrentStartTime<span class="sy1">=</span>getLocalTime<span class="br0">&#40;</span><span class="sy3">&amp;</span>g_tmCurrentStartTime<span class="br0">&#41;</span><span class="sy4">;</span></div></li><li class="li1"><div class="de1">				<span class="co1">//now again check if we have a valid date</span></div></li><li class="li1"><div class="de1">				nclog<span class="br0">&#40;</span>L<span class="st0">&quot;Checking for valid date/time...<span class="es1">\n</span>&quot;</span><span class="br0">&#41;</span><span class="sy4">;</span></div></li><li class="li1"><div class="de1">				<span class="kw1">if</span><span class="br0">&#40;</span> <span class="br0">&#40;</span><span class="br0">&#40;</span>g_tmCurrentStartTime.<span class="me1">tm_year</span><span class="sy2">+</span><span class="nu0">1900</span><span class="br0">&#41;</span><span class="sy2">*</span><span class="nu0">100</span> <span class="sy2">+</span> g_tmCurrentStartTime.<span class="me1">tm_mon</span><span class="sy2">+</span><span class="nu0">1</span><span class="br0">&#41;</span> <span class="sy1">&lt;</span> <span class="nu0">201111</span><span class="br0">&#41;</span><span class="br0">&#123;</span></div></li><li class="li1"><div class="de1">					nclog<span class="br0">&#40;</span>L<span class="st0">&quot;scheduling event notifications<span class="es1">\n</span>&quot;</span><span class="br0">&#41;</span><span class="sy4">;</span></div></li><li class="li1"><div class="de1">					<span class="co1">//clear and renew all event notifications</span></div></li><li class="li1"><div class="de1">					<span class="co2">#ifndef TESTMODE</span></div></li><li class="li1"><div class="de1">						RunAppAtTimeChangeEvents<span class="br0">&#40;</span>szTaskerEXE<span class="br0">&#41;</span><span class="sy4">;</span></div></li><li class="li1"><div class="de1">					<span class="co2">#endif</span></div></li><li class="li1"><div class="de1">					nclog<span class="br0">&#40;</span>L<span class="st0">&quot;Date/Time not valid!<span class="es1">\n</span>*********** END ************<span class="es1">\n</span>&quot;</span><span class="br0">&#41;</span><span class="sy4">;</span></div></li><li class="li1"><div class="de1">					<span class="kw1">return</span> <span class="nu12">0xBADCAB1E</span><span class="sy4">;</span></div></li><li class="li1"><div class="de1">				<span class="br0">&#125;</span></div></li><li class="li1"><div class="de1">				nclog<span class="br0">&#40;</span>L<span class="st0">&quot;Date/Time after 11 2011. OK<span class="es1">\n</span>&quot;</span><span class="br0">&#41;</span><span class="sy4">;</span></div></li><li class="li1"><div class="de1">&nbsp;</div></li><li class="li1"><div class="de1">			<span class="co1">//schedule all active tasks</span></div></li><li class="li1"><div class="de1">			<span class="kw4">int</span> iCount <span class="sy1">=</span> scheduleAllTasks<span class="br0">&#40;</span><span class="br0">&#41;</span><span class="sy4">;</span></div></li><li class="li1"><div class="de1">			nclog<span class="br0">&#40;</span>L<span class="st0">&quot;Scheduled %i Tasks<span class="es1">\n</span>&quot;</span>, iCount<span class="br0">&#41;</span><span class="sy4">;</span></div></li><li class="li1"><div class="de1">		<span class="br0">&#125;</span></div></li></ol></pre></div></div>
<p>Additionally we found that the time changes may also occur during program launch or as tasker2 instances wait for another tasker2 instance. So tasker2 uses only one (in real two) calls to get the current time. This is essential, as tasker2 uses the current time to re-schedule tasks. The current time is called at the beginning, before tasker2 waits for the mutex. This is the time tasker2 was launched. If there has been a time_changed schedule, tasker2 will use another call to the current time, as it may have changed between the launch and the further execution of the code &#8211; after the mutex is released and the current instance is allowed to run.</p>
<h2>Delayed schedules II (pitfall 3)</h2>
<p>As only one instance of tasker2 is executing, it may happen, that the current time and the task time do not match exactly. Although the scheduler may do its best to launch tasker2 at the right time, the execution may be delayed in regards of the time the task is to be scheduled and the current time. This is another delayed schedule compared to the above flooding of schedules after a power down/up cycle.<br />
It may also happen that a lot of tasker2 instances are waiting for execution, you know that we can have up to ten tasks. This may also lead to &#8216;delayed&#8217; code execution, but should be in a small time frame of some minutes only.<br />
Therefor tasker2 supports a maximum allowed delay time to distinguish between allowed and flooding delayed calls.</p>
<div id="wpshdo_6" class="wp-synhighlighter-outer"><div id="wpshdt_6" class="wp-synhighlighter-expanded"><table border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_6"></a><a id="wpshat_6" class="wp-synhighlighter-title" href="#codesyntax_6"  onClick="javascript:wpsh_toggleBlock(6)" title="Click to show/hide code block">Source code</a></td><td align="right"><a href="#codesyntax_6" onClick="javascript:wpsh_code(6)" title="Show code only"><img border="0" style="border: 0 none" src="http://www.hjgode.de/wp/wp-content/plugins/wp-synhighlight/themes/default/images/code.png" /></a>&nbsp;<a href="#codesyntax_6" onClick="javascript:wpsh_print(6)" title="Print code"><img border="0" style="border: 0 none" src="http://www.hjgode.de/wp/wp-content/plugins/wp-synhighlight/themes/default/images/printer.png" /></a>&nbsp;<a href="http://www.hjgode.de/wp/wp-content/plugins/wp-synhighlight/About.html" target="_blank" title="Show plugin information"><img border="0" style="border: 0 none" src="http://www.hjgode.de/wp/wp-content/plugins/wp-synhighlight/themes/default/images/info.gif" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_6" class="wp-synhighlighter-inner" style="display: block;"><pre class="cpp" style="font-family:monospace;"><ol><li class="li1"><div class="de1"><span class="co1">//is this a delayed schedule?</span></div></li><li class="li1"><div class="de1">		nclog<span class="br0">&#40;</span>L<span class="st0">&quot;<span class="es1">\t</span>checking for delayed schedule...<span class="es1">\n</span>&quot;</span><span class="br0">&#41;</span><span class="sy4">;</span></div></li><li class="li1"><div class="de1">		<span class="kw4">int</span> iDeltaMinutes<span class="sy4">;</span></div></li><li class="li1"><div class="de1">		__time64_t ttStart<span class="sy4">;</span></div></li><li class="li1"><div class="de1">		__time64_t ttStop<span class="sy4">;</span></div></li><li class="li1"><div class="de1">		__time64_t ttCurr<span class="sy4">;</span></div></li><li class="li1"><div class="de1">		ttStop <span class="sy1">=</span> _mktime64<span class="br0">&#40;</span><span class="sy3">&amp;</span><span class="br0">&#40;</span>_Tasks<span class="br0">&#91;</span>iTask<span class="br0">&#93;</span>.<span class="me1">stStopTime</span><span class="br0">&#41;</span><span class="br0">&#41;</span><span class="sy4">;</span></div></li><li class="li1"><div class="de1">		ttStart <span class="sy1">=</span> _mktime64<span class="br0">&#40;</span><span class="sy3">&amp;</span><span class="br0">&#40;</span>_Tasks<span class="br0">&#91;</span>iTask<span class="br0">&#93;</span>.<span class="me1">stStartTime</span><span class="br0">&#41;</span><span class="br0">&#41;</span><span class="sy4">;</span></div></li><li class="li1"><div class="de1">		ttCurr <span class="sy1">=</span> _mktime64<span class="br0">&#40;</span><span class="sy3">&amp;</span>g_tmCurrentStartTime<span class="br0">&#41;</span><span class="sy4">;</span></div></li><li class="li1"><div class="de1">&nbsp;</div></li><li class="li1"><div class="de1">		<span class="kw1">if</span><span class="br0">&#40;</span>thisTaskType<span class="sy1">==</span>stopTask<span class="br0">&#41;</span><span class="br0">&#123;</span></div></li><li class="li1"><div class="de1">			<span class="co1">//difftime(timer1, timer0) returns the elapsed time in seconds, from timer0 to timer1</span></div></li><li class="li1"><div class="de1">			iDeltaMinutes <span class="sy1">=</span> <span class="kw3">difftime</span><span class="br0">&#40;</span>ttCurr, ttStop<span class="br0">&#41;</span><span class="sy2">/</span><span class="nu0">60</span><span class="sy4">;</span><span class="co1">// stDeltaMinutes(_Tasks[iTask].stStopTime, g_CurrentStartTime);</span></div></li><li class="li1"><div class="de1">			nclog<span class="br0">&#40;</span>L<span class="st0">&quot;stStopTime = '%s', &quot;</span>, getLongStrFromTM<span class="br0">&#40;</span>_Tasks<span class="br0">&#91;</span>iTask<span class="br0">&#93;</span>.<span class="me1">stStopTime</span><span class="br0">&#41;</span><span class="br0">&#41;</span><span class="sy4">;</span></div></li><li class="li1"><div class="de1">		<span class="br0">&#125;</span></div></li><li class="li1"><div class="de1">		<span class="kw1">else</span><span class="br0">&#123;</span></div></li><li class="li1"><div class="de1">			iDeltaMinutes <span class="sy1">=</span> <span class="kw3">difftime</span><span class="br0">&#40;</span>ttStart, ttCurr<span class="br0">&#41;</span><span class="sy2">/</span><span class="nu0">60</span><span class="sy4">;</span><span class="co1">// stDeltaMinutes(_Tasks[iTask].stStartTime, g_CurrentStartTime);</span></div></li><li class="li1"><div class="de1">			nclog<span class="br0">&#40;</span>L<span class="st0">&quot;stStartTime = '%s', &quot;</span>, getLongStrFromTM<span class="br0">&#40;</span>_Tasks<span class="br0">&#91;</span>iTask<span class="br0">&#93;</span>.<span class="me1">stStartTime</span><span class="br0">&#41;</span><span class="br0">&#41;</span><span class="sy4">;</span></div></li><li class="li1"><div class="de1">		<span class="br0">&#125;</span></div></li></ol></pre></div></div>
<h2>Adding a schedule</h2>
<p>I am using central functions in code to add or remove schedules. Here is a sample of how a schedule is added:</p>
<div id="wpshdo_7" class="wp-synhighlighter-outer"><div id="wpshdt_7" class="wp-synhighlighter-expanded"><table border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_7"></a><a id="wpshat_7" class="wp-synhighlighter-title" href="#codesyntax_7"  onClick="javascript:wpsh_toggleBlock(7)" title="Click to show/hide code block">Source code</a></td><td align="right"><a href="#codesyntax_7" onClick="javascript:wpsh_code(7)" title="Show code only"><img border="0" style="border: 0 none" src="http://www.hjgode.de/wp/wp-content/plugins/wp-synhighlight/themes/default/images/code.png" /></a>&nbsp;<a href="#codesyntax_7" onClick="javascript:wpsh_print(7)" title="Print code"><img border="0" style="border: 0 none" src="http://www.hjgode.de/wp/wp-content/plugins/wp-synhighlight/themes/default/images/printer.png" /></a>&nbsp;<a href="http://www.hjgode.de/wp/wp-content/plugins/wp-synhighlight/About.html" target="_blank" title="Show plugin information"><img border="0" style="border: 0 none" src="http://www.hjgode.de/wp/wp-content/plugins/wp-synhighlight/themes/default/images/info.gif" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_7" class="wp-synhighlighter-inner" style="display: block;"><pre class="cpp" style="font-family:monospace;"><ol><li class="li1"><div class="de1">...</div></li><li class="li1"><div class="de1"><span class="co2">#include &quot;notify.h&quot;</span></div></li><li class="li1"><div class="de1">...</div></li><li class="li1"><div class="de1"><span class="co1">//--------------------------------------------------------------------</span></div></li><li class="li1"><div class="de1"><span class="co1">// Function name  : ScheduleRunApp</span></div></li><li class="li1"><div class="de1"><span class="co1">// Description    : add a schedule for exe with args at the time</span></div></li><li class="li1"><div class="de1"><span class="co1">// Argument       : LPCTSTR szExeName</span></div></li><li class="li1"><div class="de1"><span class="co1">// Argument       : LPCTSTR szArgs</span></div></li><li class="li1"><div class="de1"><span class="co1">// Argument       : struct tm tmTime</span></div></li><li class="li1"><div class="de1"><span class="co1">// Return type    : HRESULT, 0 for no error</span></div></li><li class="li1"><div class="de1"><span class="co1">//--------------------------------------------------------------------</span></div></li><li class="li1"><div class="de1">HRESULT ScheduleRunApp<span class="br0">&#40;</span>LPCTSTR szExeName, LPCTSTR szArgs, <span class="kw4">struct</span> <span class="kw4">tm</span> tmTime<span class="br0">&#41;</span></div></li><li class="li1"><div class="de1"><span class="br0">&#123;</span></div></li><li class="li1"><div class="de1">	HRESULT hr <span class="sy1">=</span> S_OK<span class="sy4">;</span></div></li><li class="li1"><div class="de1">	HANDLE hNotify <span class="sy1">=</span> <span class="kw2">NULL</span><span class="sy4">;</span></div></li><li class="li1"><div class="de1">&nbsp;</div></li><li class="li1"><div class="de1">	<span class="co1">// set a CE_NOTIFICATION_TRIGGER</span></div></li><li class="li1"><div class="de1">	CE_NOTIFICATION_TRIGGER notifTrigger<span class="sy4">;</span></div></li><li class="li1"><div class="de1">	<span class="kw3">memset</span><span class="br0">&#40;</span><span class="sy3">&amp;</span>notifTrigger, 0, <span class="kw3">sizeof</span><span class="br0">&#40;</span>CE_NOTIFICATION_TRIGGER<span class="br0">&#41;</span><span class="br0">&#41;</span><span class="sy4">;</span></div></li><li class="li1"><div class="de1">	notifTrigger.<span class="me1">dwSize</span> <span class="sy1">=</span> <span class="kw3">sizeof</span><span class="br0">&#40;</span>CE_NOTIFICATION_TRIGGER<span class="br0">&#41;</span><span class="sy4">;</span></div></li><li class="li1"><div class="de1">&nbsp;</div></li><li class="li1"><div class="de1">	<span class="co1">// calculate time</span></div></li><li class="li1"><div class="de1">	SYSTEMTIME st <span class="sy1">=</span> <span class="br0">&#123;</span>0<span class="br0">&#125;</span><span class="sy4">;</span></div></li><li class="li1"><div class="de1">	<span class="co1">//GetLocalTime(&amp;st); //v.2.28</span></div></li><li class="li1"><div class="de1">&nbsp;</div></li><li class="li1"><div class="de1">	st <span class="sy1">=</span> convertTM2SYSTEMTIME<span class="br0">&#40;</span><span class="sy3">&amp;</span>st, <span class="sy3">&amp;</span>tmTime<span class="br0">&#41;</span><span class="sy4">;</span> <span class="co1">//use provided new datetime</span></div></li><li class="li1"><div class="de1">&nbsp;</div></li><li class="li1"><div class="de1">	wsprintf<span class="br0">&#40;</span>str, L<span class="st0">&quot;Next run at: %02i.%02i.%02i %02i:%02i:%02i&quot;</span>,</div></li><li class="li1"><div class="de1">										st.<span class="me1">wDay</span>, st.<span class="me1">wMonth</span> , st.<span class="me1">wYear</span>,</div></li><li class="li1"><div class="de1">										st.<span class="me1">wHour</span> , st.<span class="me1">wMinute</span> , st.<span class="me1">wSecond</span> <span class="br0">&#41;</span><span class="sy4">;</span></div></li><li class="li1"><div class="de1">	nclog<span class="br0">&#40;</span>L<span class="st0">&quot;<span class="es1">\t</span>ScheduleRunApp: %s<span class="es1">\n</span>&quot;</span>, str<span class="br0">&#41;</span><span class="sy4">;</span></div></li><li class="li1"><div class="de1">&nbsp;</div></li><li class="li1"><div class="de1">	notifTrigger.<span class="me1">dwType</span> <span class="sy1">=</span> CNT_TIME<span class="sy4">;</span></div></li><li class="li1"><div class="de1">	notifTrigger.<span class="me1">stStartTime</span> <span class="sy1">=</span> st<span class="sy4">;</span></div></li><li class="li1"><div class="de1">&nbsp;</div></li><li class="li1"><div class="de1">	<span class="co1">// timer: execute an exe at specified time</span></div></li><li class="li1"><div class="de1">	notifTrigger.<span class="me1">lpszApplication</span> <span class="sy1">=</span> <span class="br0">&#40;</span>LPTSTR<span class="br0">&#41;</span>szExeName<span class="sy4">;</span></div></li><li class="li1"><div class="de1">	notifTrigger.<span class="me1">lpszArguments</span> <span class="sy1">=</span> <span class="br0">&#40;</span>LPTSTR<span class="br0">&#41;</span>szArgs<span class="sy4">;</span></div></li><li class="li1"><div class="de1">&nbsp;</div></li><li class="li1"><div class="de1">	hNotify <span class="sy1">=</span> CeSetUserNotificationEx<span class="br0">&#40;</span>0, <span class="sy3">&amp;</span>notifTrigger, <span class="kw2">NULL</span><span class="br0">&#41;</span><span class="sy4">;</span></div></li><li class="li1"><div class="de1">	<span class="co1">// NULL because we do not care the action</span></div></li><li class="li1"><div class="de1">	<span class="kw1">if</span> <span class="br0">&#40;</span><span class="sy3">!</span>hNotify<span class="br0">&#41;</span> <span class="br0">&#123;</span></div></li><li class="li1"><div class="de1">		hr <span class="sy1">=</span> E_FAIL<span class="sy4">;</span></div></li><li class="li1"><div class="de1">		nclog<span class="br0">&#40;</span>L<span class="st0">&quot;<span class="es1">\t</span>ScheduleRunApp: CeSetUserNotificationEx FAILED...<span class="es1">\n</span>&quot;</span><span class="br0">&#41;</span><span class="sy4">;</span></div></li><li class="li1"><div class="de1">	<span class="br0">&#125;</span> <span class="kw1">else</span> <span class="br0">&#123;</span></div></li><li class="li1"><div class="de1">		<span class="co1">// close the handle as we do not need to use it further</span></div></li><li class="li1"><div class="de1">		CloseHandle<span class="br0">&#40;</span>hNotify<span class="br0">&#41;</span><span class="sy4">;</span></div></li><li class="li1"><div class="de1">		nclog<span class="br0">&#40;</span>L<span class="st0">&quot;<span class="es1">\t</span>ScheduleRunApp: CeSetUserNotificationEx succeeded...<span class="es1">\n</span>&quot;</span><span class="br0">&#41;</span><span class="sy4">;</span></div></li><li class="li1"><div class="de1">	<span class="br0">&#125;</span></div></li><li class="li1"><div class="de1">	<span class="kw1">return</span> hr<span class="sy4">;</span></div></li><li class="li1"><div class="de1"><span class="br0">&#125;</span></div></li></ol></pre></div></div>
<h2>The main code</h2>
<p>The main function is processStartStopCmd() beside createNextSchedule(). It does all the scheduling and time calculations.</p>
<div id="wpshdo_8" class="wp-synhighlighter-outer"><div id="wpshdt_8" class="wp-synhighlighter-expanded"><table border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_8"></a><a id="wpshat_8" class="wp-synhighlighter-title" href="#codesyntax_8"  onClick="javascript:wpsh_toggleBlock(8)" title="Click to show/hide code block">Source code</a></td><td align="right"><a href="#codesyntax_8" onClick="javascript:wpsh_code(8)" title="Show code only"><img border="0" style="border: 0 none" src="http://www.hjgode.de/wp/wp-content/plugins/wp-synhighlight/themes/default/images/code.png" /></a>&nbsp;<a href="#codesyntax_8" onClick="javascript:wpsh_print(8)" title="Print code"><img border="0" style="border: 0 none" src="http://www.hjgode.de/wp/wp-content/plugins/wp-synhighlight/themes/default/images/printer.png" /></a>&nbsp;<a href="http://www.hjgode.de/wp/wp-content/plugins/wp-synhighlight/About.html" target="_blank" title="Show plugin information"><img border="0" style="border: 0 none" src="http://www.hjgode.de/wp/wp-content/plugins/wp-synhighlight/themes/default/images/info.gif" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_8" class="wp-synhighlighter-inner" style="display: block;"><pre class="cpp" style="font-family:monospace;"><ol><li class="li1"><div class="de1"><span class="coMULTI">/*	########################################################</span></div></li><li class="li1"><div class="de1"><span class="coMULTI">		Process -s and -k comd line args</span></div></li><li class="li1"><div class="de1"><span class="coMULTI">	########################################################</span></div></li><li class="li1"><div class="de1"><span class="coMULTI">*/</span></div></li><li class="li1"><div class="de1"><span class="co1">//--------------------------------------------------------------------</span></div></li><li class="li1"><div class="de1"><span class="co1">// Function name  : processStartStopCmd</span></div></li><li class="li1"><div class="de1"><span class="co1">// Description    : calc new start/stop time, add schedules and start/kill application</span></div></li><li class="li1"><div class="de1"><span class="co1">// Argument       : TCHAR* argv[], the cmdLine array</span></div></li><li class="li1"><div class="de1"><span class="co1">// Return type    : int, 0 for no error</span></div></li><li class="li1"><div class="de1"><span class="co1">//--------------------------------------------------------------------</span></div></li><li class="li1"><div class="de1"><span class="kw4">int</span> processStartStopCmd<span class="br0">&#40;</span>TCHAR<span class="sy2">*</span> argv<span class="br0">&#91;</span><span class="br0">&#93;</span><span class="br0">&#41;</span><span class="br0">&#123;</span></div></li><li class="li1"><div class="de1">	<span class="kw4">int</span> iReturn <span class="sy1">=</span> <span class="nu0">0</span><span class="sy4">;</span></div></li><li class="li1"><div class="de1">&nbsp;</div></li><li class="li1"><div class="de1">	BOOL bIsDelayedSchedule <span class="sy1">=</span> TRUE<span class="sy4">;</span> <span class="co1">//used to save a delayed schedule situation</span></div></li><li class="li1"><div class="de1">&nbsp;</div></li><li class="li1"><div class="de1">	<span class="kw2">enum</span> taskType<span class="br0">&#123;</span></div></li><li class="li1"><div class="de1">		startTask <span class="sy1">=</span> 1,</div></li><li class="li1"><div class="de1">		stopTask <span class="sy1">=</span> 2</div></li><li class="li1"><div class="de1">	<span class="br0">&#125;</span><span class="sy4">;</span></div></li><li class="li1"><div class="de1">	taskType thisTaskType<span class="sy4">;</span></div></li><li class="li1"><div class="de1">&nbsp;</div></li><li class="li1"><div class="de1">	<span class="kw1">if</span><span class="br0">&#40;</span>wcsicmp<span class="br0">&#40;</span>argv<span class="br0">&#91;</span><span class="nu0">1</span><span class="br0">&#93;</span>, L<span class="st0">&quot;-k&quot;</span><span class="br0">&#41;</span><span class="sy1">==</span><span class="nu0">0</span><span class="br0">&#41;</span>	<span class="co1">//kill taskX app</span></div></li><li class="li1"><div class="de1">		thisTaskType<span class="sy1">=</span>stopTask<span class="sy4">;</span></div></li><li class="li1"><div class="de1">	<span class="kw1">else</span></div></li><li class="li1"><div class="de1">		thisTaskType<span class="sy1">=</span>startTask<span class="sy4">;</span></div></li><li class="li1"><div class="de1">&nbsp;</div></li><li class="li1"><div class="de1">	<span class="kw4">int</span> iTask <span class="sy1">=</span> getTaskNumber<span class="br0">&#40;</span>argv<span class="br0">&#91;</span>2<span class="br0">&#93;</span><span class="br0">&#41;</span><span class="sy4">;</span></div></li><li class="li1"><div class="de1">	<span class="kw1">if</span><span class="br0">&#40;</span>_Tasks<span class="br0">&#91;</span>iTask<span class="br0">&#93;</span>.<span class="me1">iActive</span><span class="sy1">==</span><span class="nu0">1</span><span class="br0">&#41;</span><span class="br0">&#123;</span></div></li><li class="li1"><div class="de1">		<span class="co1">//create a new schedule cmd line for tasker</span></div></li><li class="li1"><div class="de1">		TCHAR strTaskCmdLine<span class="br0">&#91;</span>MAX_PATH<span class="br0">&#93;</span><span class="sy4">;</span></div></li><li class="li1"><div class="de1">&nbsp;</div></li><li class="li1"><div class="de1">		<span class="kw1">if</span><span class="br0">&#40;</span>thisTaskType<span class="sy1">==</span>stopTask<span class="br0">&#41;</span></div></li><li class="li1"><div class="de1">			wsprintf<span class="br0">&#40;</span>strTaskCmdLine, L<span class="st0">&quot;-k task%i&quot;</span>, iTask<span class="sy2">+</span>1<span class="br0">&#41;</span><span class="sy4">;</span> <span class="co1">//the cmdLine for tasker.exe for this task</span></div></li><li class="li1"><div class="de1">		<span class="kw1">else</span></div></li><li class="li1"><div class="de1">			wsprintf<span class="br0">&#40;</span>strTaskCmdLine, L<span class="st0">&quot;-s task%i&quot;</span>, iTask<span class="sy2">+</span>1<span class="br0">&#41;</span><span class="sy4">;</span> <span class="co1">//the cmdLine for tasker.exe for this task	</span></div></li><li class="li1"><div class="de1">&nbsp;</div></li><li class="li1"><div class="de1">		<span class="co1">//clear all tasker schedules for taskX</span></div></li><li class="li1"><div class="de1">		nclog<span class="br0">&#40;</span>L<span class="st0">&quot;Clearing all schedules for Task%i with '%s'<span class="es1">\n</span>&quot;</span>, iTask<span class="sy2">+</span>1, strTaskCmdLine<span class="br0">&#41;</span><span class="sy4">;</span></div></li><li class="li1"><div class="de1">		notiClearRunApp<span class="br0">&#40;</span>szTaskerEXE, strTaskCmdLine<span class="br0">&#41;</span><span class="sy4">;</span></div></li><li class="li1"><div class="de1">&nbsp;</div></li><li class="li1"><div class="de1">		<span class="kw4">struct</span> <span class="kw4">tm</span> tmNewTime <span class="sy1">=</span> <span class="br0">&#123;</span>0<span class="br0">&#125;</span><span class="sy4">;</span></div></li><li class="li1"><div class="de1">		<span class="kw4">short</span> shHour	<span class="sy1">=</span>	_Tasks<span class="br0">&#91;</span>iTask<span class="br0">&#93;</span>.<span class="me1">stDiffTime</span>.<span class="me1">tm_hour</span><span class="sy4">;</span></div></li><li class="li1"><div class="de1">		<span class="kw4">short</span> shMin		<span class="sy1">=</span>	_Tasks<span class="br0">&#91;</span>iTask<span class="br0">&#93;</span>.<span class="me1">stDiffTime</span>.<span class="me1">tm_min</span><span class="sy4">;</span></div></li><li class="li1"><div class="de1">		<span class="kw4">short</span> shDays	<span class="sy1">=</span>	<span class="nu0">0</span><span class="sy4">;</span></div></li><li class="li1"><div class="de1">		<span class="kw1">if</span><span class="br0">&#40;</span>shHour<span class="sy1">&gt;=</span><span class="nu0">24</span><span class="br0">&#41;</span><span class="br0">&#123;</span>	<span class="co1">//hour interval value is one day or more</span></div></li><li class="li1"><div class="de1">			shDays <span class="sy1">=</span> <span class="br0">&#40;</span><span class="kw4">short</span><span class="br0">&#41;</span> <span class="br0">&#40;</span>shHour <span class="sy2">/</span> 24<span class="br0">&#41;</span><span class="sy4">;</span></div></li><li class="li1"><div class="de1">			shHour <span class="sy1">=</span> <span class="br0">&#40;</span><span class="kw4">short</span><span class="br0">&#41;</span> <span class="br0">&#40;</span>shHour <span class="sy2">%</span> 24<span class="br0">&#41;</span><span class="sy4">;</span></div></li><li class="li1"><div class="de1">		<span class="br0">&#125;</span>				</div></li><li class="li1"><div class="de1">&nbsp;</div></li><li class="li1"><div class="de1">		<span class="co1">//is this a delayed schedule?</span></div></li><li class="li1"><div class="de1">		nclog<span class="br0">&#40;</span>L<span class="st0">&quot;<span class="es1">\t</span>checking for delayed schedule...<span class="es1">\n</span>&quot;</span><span class="br0">&#41;</span><span class="sy4">;</span></div></li><li class="li1"><div class="de1">		<span class="kw4">int</span> iDeltaMinutes<span class="sy4">;</span></div></li><li class="li1"><div class="de1">		__time64_t ttStart<span class="sy4">;</span></div></li><li class="li1"><div class="de1">		__time64_t ttStop<span class="sy4">;</span></div></li><li class="li1"><div class="de1">		__time64_t ttCurr<span class="sy4">;</span></div></li><li class="li1"><div class="de1">		ttStop <span class="sy1">=</span> _mktime64<span class="br0">&#40;</span><span class="sy3">&amp;</span><span class="br0">&#40;</span>_Tasks<span class="br0">&#91;</span>iTask<span class="br0">&#93;</span>.<span class="me1">stStopTime</span><span class="br0">&#41;</span><span class="br0">&#41;</span><span class="sy4">;</span></div></li><li class="li1"><div class="de1">		ttStart <span class="sy1">=</span> _mktime64<span class="br0">&#40;</span><span class="sy3">&amp;</span><span class="br0">&#40;</span>_Tasks<span class="br0">&#91;</span>iTask<span class="br0">&#93;</span>.<span class="me1">stStartTime</span><span class="br0">&#41;</span><span class="br0">&#41;</span><span class="sy4">;</span></div></li><li class="li1"><div class="de1">		ttCurr <span class="sy1">=</span> _mktime64<span class="br0">&#40;</span><span class="sy3">&amp;</span>g_tmCurrentStartTime<span class="br0">&#41;</span><span class="sy4">;</span></div></li><li class="li1"><div class="de1">&nbsp;</div></li><li class="li1"><div class="de1">		<span class="kw1">if</span><span class="br0">&#40;</span>thisTaskType<span class="sy1">==</span>stopTask<span class="br0">&#41;</span><span class="br0">&#123;</span></div></li><li class="li1"><div class="de1">			<span class="co1">//difftime(timer1, timer0) returns the elapsed time in seconds, from timer0 to timer1</span></div></li><li class="li1"><div class="de1">			iDeltaMinutes <span class="sy1">=</span> <span class="kw3">difftime</span><span class="br0">&#40;</span>ttCurr, ttStop<span class="br0">&#41;</span><span class="sy2">/</span><span class="nu0">60</span><span class="sy4">;</span><span class="co1">// stDeltaMinutes(_Tasks[iTask].stStopTime, g_CurrentStartTime);</span></div></li><li class="li1"><div class="de1">			nclog<span class="br0">&#40;</span>L<span class="st0">&quot;stStopTime = '%s', &quot;</span>, getLongStrFromTM<span class="br0">&#40;</span>_Tasks<span class="br0">&#91;</span>iTask<span class="br0">&#93;</span>.<span class="me1">stStopTime</span><span class="br0">&#41;</span><span class="br0">&#41;</span><span class="sy4">;</span></div></li><li class="li1"><div class="de1">		<span class="br0">&#125;</span></div></li><li class="li1"><div class="de1">		<span class="kw1">else</span><span class="br0">&#123;</span></div></li><li class="li1"><div class="de1">			iDeltaMinutes <span class="sy1">=</span> <span class="kw3">difftime</span><span class="br0">&#40;</span>ttStart, ttCurr<span class="br0">&#41;</span><span class="sy2">/</span><span class="nu0">60</span><span class="sy4">;</span><span class="co1">// stDeltaMinutes(_Tasks[iTask].stStartTime, g_CurrentStartTime);</span></div></li><li class="li1"><div class="de1">			nclog<span class="br0">&#40;</span>L<span class="st0">&quot;stStartTime = '%s', &quot;</span>, getLongStrFromTM<span class="br0">&#40;</span>_Tasks<span class="br0">&#91;</span>iTask<span class="br0">&#93;</span>.<span class="me1">stStartTime</span><span class="br0">&#41;</span><span class="br0">&#41;</span><span class="sy4">;</span></div></li><li class="li1"><div class="de1">		<span class="br0">&#125;</span></div></li><li class="li1"><div class="de1">&nbsp;</div></li><li class="li1"><div class="de1">		nclog<span class="br0">&#40;</span>L<span class="st0">&quot;current time = '%s'<span class="es1">\n</span>&quot;</span>, getLongStrFromTM<span class="br0">&#40;</span>g_tmCurrentStartTime<span class="br0">&#41;</span><span class="br0">&#41;</span><span class="sy4">;</span></div></li><li class="li1"><div class="de1">		nclog<span class="br0">&#40;</span>L<span class="st0">&quot;interval is: %id%02ih%02im<span class="es1">\n</span>&quot;</span>, shDays, shHour, shMin<span class="br0">&#41;</span><span class="sy4">;</span></div></li><li class="li1"><div class="de1">		nclog<span class="br0">&#40;</span>L<span class="st0">&quot;<span class="es1">\t</span>delta is %i minutes<span class="es1">\n</span>&quot;</span>, iDeltaMinutes<span class="br0">&#41;</span><span class="sy4">;</span></div></li><li class="li1"><div class="de1">&nbsp;</div></li><li class="li1"><div class="de1">		<span class="co1">//started BEFORE scheduled time, iDelta is negative</span></div></li><li class="li1"><div class="de1">		<span class="kw1">if</span><span class="br0">&#40;</span>iDeltaMinutes<span class="sy1">&lt;</span>0<span class="br0">&#41;</span><span class="br0">&#123;</span></div></li><li class="li1"><div class="de1">			<span class="kw1">if</span><span class="br0">&#40;</span>thisTaskType<span class="sy1">==</span>stopTask<span class="br0">&#41;</span><span class="br0">&#123;</span></div></li><li class="li1"><div class="de1">				<span class="co1">//calculate new schedules or leave them as is?</span></div></li><li class="li1"><div class="de1">				<span class="co1">//tmNewTime=_Tasks[iTask].stStopTime;	//leave them as is</span></div></li><li class="li1"><div class="de1">				tmNewTime<span class="sy1">=</span>createNextSchedule<span class="br0">&#40;</span>_Tasks<span class="br0">&#91;</span>iTask<span class="br0">&#93;</span>.<span class="me1">stStopTime</span>, shDays,shHour,shMin<span class="br0">&#41;</span><span class="sy4">;</span> <span class="co1">//calc new schedule</span></div></li><li class="li1"><div class="de1">			<span class="br0">&#125;</span></div></li><li class="li1"><div class="de1">			<span class="kw1">else</span><span class="br0">&#123;</span></div></li><li class="li1"><div class="de1">				<span class="co1">//tmNewTime=_Tasks[iTask].stStartTime;	//leave them as is</span></div></li><li class="li1"><div class="de1">				tmNewTime<span class="sy1">=</span>createNextSchedule<span class="br0">&#40;</span>_Tasks<span class="br0">&#91;</span>iTask<span class="br0">&#93;</span>.<span class="me1">stStartTime</span>, shDays,shHour,shMin<span class="br0">&#41;</span><span class="sy4">;</span> <span class="co1">//calc new schedule</span></div></li><li class="li1"><div class="de1">			<span class="br0">&#125;</span></div></li><li class="li1"><div class="de1"><span class="co2">#ifndef TESTMODE</span></div></li><li class="li1"><div class="de1">			ScheduleRunApp<span class="br0">&#40;</span>szTaskerEXE, strTaskCmdLine, tmNewTime<span class="br0">&#41;</span><span class="sy4">;</span></div></li><li class="li1"><div class="de1"><span class="co2">#endif</span></div></li><li class="li1"><div class="de1">			nclog<span class="br0">&#40;</span>L<span class="st0">&quot;*** re-scheduled future task *** <span class="es1">\n</span>&quot;</span><span class="br0">&#41;</span><span class="sy4">;</span></div></li><li class="li1"><div class="de1">			<span class="kw1">return</span> <span class="nu0">0</span><span class="sy4">;</span></div></li><li class="li1"><div class="de1">		<span class="br0">&#125;</span></div></li><li class="li1"><div class="de1">&nbsp;</div></li><li class="li1"><div class="de1">		<span class="kw4">int</span> iMaxDelay <span class="sy1">=</span> getMaxDelay<span class="br0">&#40;</span><span class="br0">&#41;</span><span class="sy4">;</span></div></li><li class="li1"><div class="de1">		nclog<span class="br0">&#40;</span>L<span class="st0">&quot;<span class="es1">\t</span>max allowed diff for delayed schedule recognition is plus %i<span class="es1">\n</span>&quot;</span>, iMaxDelay<span class="br0">&#41;</span><span class="sy4">;</span></div></li><li class="li1"><div class="de1">&nbsp;</div></li><li class="li1"><div class="de1">		<span class="kw1">if</span><span class="br0">&#40;</span> iDeltaMinutes <span class="sy1">&gt;</span> iMaxDelay <span class="br0">&#41;</span> <span class="co1">//is the time diff greater than 1 minute</span></div></li><li class="li1"><div class="de1">		<span class="br0">&#123;</span></div></li><li class="li1"><div class="de1">			bIsDelayedSchedule <span class="sy1">=</span> TRUE<span class="sy4">;</span></div></li><li class="li1"><div class="de1">			nclog<span class="br0">&#40;</span>L<span class="st0">&quot;*** delayed schedule *** recognized<span class="es1">\n</span>&quot;</span><span class="br0">&#41;</span><span class="sy4">;</span></div></li><li class="li1"><div class="de1">			<span class="co1">//this is a delayed schedule</span></div></li><li class="li1"><div class="de1">			DOUBLE dbTimeDiff <span class="sy1">=</span> <span class="nu0">0</span><span class="sy4">;</span></div></li><li class="li1"><div class="de1">&nbsp;</div></li><li class="li1"><div class="de1">			<span class="co1">//it may happen that the schedule is far in the future</span></div></li><li class="li1"><div class="de1">			<span class="co1">//we calc the next schedule on base of the current time by using the saved start/stop time</span></div></li><li class="li1"><div class="de1">			<span class="co1">//is just greater than the current time</span></div></li><li class="li1"><div class="de1">			<span class="kw1">if</span><span class="br0">&#40;</span>thisTaskType<span class="sy1">==</span>stopTask<span class="br0">&#41;</span></div></li><li class="li1"><div class="de1">				tmNewTime<span class="sy1">=</span>_Tasks<span class="br0">&#91;</span>iTask<span class="br0">&#93;</span>.<span class="me1">stStopTime</span><span class="sy4">;</span></div></li><li class="li1"><div class="de1">			<span class="kw1">else</span></div></li><li class="li1"><div class="de1">				tmNewTime<span class="sy1">=</span>_Tasks<span class="br0">&#91;</span>iTask<span class="br0">&#93;</span>.<span class="me1">stStartTime</span><span class="sy4">;</span></div></li><li class="li1"><div class="de1">&nbsp;</div></li><li class="li1"><div class="de1">			tmNewTime <span class="sy1">=</span> createNextSchedule<span class="br0">&#40;</span>tmNewTime, shDays, shHour, shMin<span class="br0">&#41;</span><span class="sy4">;</span></div></li><li class="li1"><div class="de1">		<span class="br0">&#125;</span></div></li><li class="li1"><div class="de1">		<span class="kw1">else</span><span class="br0">&#123;</span></div></li><li class="li1"><div class="de1">			nclog<span class="br0">&#40;</span>L<span class="st0">&quot;*** NO delayed schedule *** recognized<span class="es1">\n</span>&quot;</span><span class="br0">&#41;</span><span class="sy4">;</span></div></li><li class="li1"><div class="de1">			<span class="kw1">if</span><span class="br0">&#40;</span>thisTaskType<span class="sy1">==</span>stopTask<span class="br0">&#41;</span><span class="br0">&#123;</span></div></li><li class="li1"><div class="de1">				tmNewTime <span class="sy1">=</span> createNextSchedule<span class="br0">&#40;</span>_Tasks<span class="br0">&#91;</span>iTask<span class="br0">&#93;</span>.<span class="me1">stStopTime</span>, shDays, shHour, shMin<span class="br0">&#41;</span><span class="sy4">;</span></div></li><li class="li1"><div class="de1">			<span class="br0">&#125;</span></div></li><li class="li1"><div class="de1">			<span class="kw1">else</span><span class="br0">&#123;</span></div></li><li class="li1"><div class="de1">				tmNewTime <span class="sy1">=</span> createNextSchedule<span class="br0">&#40;</span>_Tasks<span class="br0">&#91;</span>iTask<span class="br0">&#93;</span>.<span class="me1">stStartTime</span>, shDays, shHour, shMin<span class="br0">&#41;</span><span class="sy4">;</span></div></li><li class="li1"><div class="de1">			<span class="br0">&#125;</span></div></li><li class="li1"><div class="de1">			bIsDelayedSchedule<span class="sy1">=</span>FALSE<span class="sy4">;</span></div></li><li class="li1"><div class="de1">		<span class="br0">&#125;</span></div></li><li class="li1"><div class="de1">&nbsp;</div></li><li class="li1"><div class="de1">		<span class="co1">//create a new kill or start schedule with new time</span></div></li><li class="li1"><div class="de1">		nclog<span class="br0">&#40;</span>L<span class="st0">&quot;Creating new schedule for '%s' in Task%i<span class="es1">\n</span>&quot;</span>, _Tasks<span class="br0">&#91;</span>iTask<span class="br0">&#93;</span>.<span class="me1">szExeName</span>, iTask<span class="sy2">+</span>1<span class="br0">&#41;</span><span class="sy4">;</span></div></li><li class="li1"><div class="de1"><span class="co2">#ifndef TESTMODE</span></div></li><li class="li1"><div class="de1">		ScheduleRunApp<span class="br0">&#40;</span>szTaskerEXE, strTaskCmdLine, tmNewTime<span class="br0">&#41;</span><span class="sy4">;</span></div></li><li class="li1"><div class="de1"><span class="co2">#endif</span></div></li><li class="li1"><div class="de1">		<span class="co1">//save new changed stop/start ime</span></div></li><li class="li1"><div class="de1">		<span class="kw1">if</span><span class="br0">&#40;</span>thisTaskType<span class="sy1">==</span>stopTask<span class="br0">&#41;</span></div></li><li class="li1"><div class="de1">			regSetStopTime<span class="br0">&#40;</span>iTask, tmNewTime<span class="br0">&#41;</span><span class="sy4">;</span></div></li><li class="li1"><div class="de1">		<span class="kw1">else</span></div></li><li class="li1"><div class="de1">			regSetStartTime<span class="br0">&#40;</span>iTask, tmNewTime<span class="br0">&#41;</span><span class="sy4">;</span></div></li><li class="li1"><div class="de1">&nbsp;</div></li><li class="li1"><div class="de1">		<span class="kw1">if</span><span class="br0">&#40;</span><span class="sy3">!</span>bIsDelayedSchedule<span class="br0">&#41;</span><span class="br0">&#123;</span></div></li><li class="li1"><div class="de1">			nclog<span class="br0">&#40;</span>L<span class="st0">&quot;Not a delayed schedule<span class="es1">\n</span>&quot;</span><span class="br0">&#41;</span><span class="sy4">;</span></div></li><li class="li1"><div class="de1">			<span class="kw1">if</span><span class="br0">&#40;</span>thisTaskType<span class="sy1">==</span>startTask<span class="br0">&#41;</span><span class="br0">&#123;</span></div></li><li class="li1"><div class="de1">				<span class="kw1">if</span><span class="br0">&#40;</span>_Tasks<span class="br0">&#91;</span>iTask<span class="br0">&#93;</span>.<span class="me1">bStartOnAConly</span><span class="br0">&#41;</span><span class="br0">&#123;</span></div></li><li class="li1"><div class="de1">					<span class="kw1">if</span><span class="br0">&#40;</span>isACpowered<span class="br0">&#40;</span><span class="br0">&#41;</span><span class="br0">&#41;</span><span class="br0">&#123;</span></div></li><li class="li1"><div class="de1">						nclog<span class="br0">&#40;</span>L<span class="st0">&quot;Starting exe '%s' as on AC power<span class="es1">\n</span>&quot;</span>, _Tasks<span class="br0">&#91;</span>iTask<span class="br0">&#93;</span>.<span class="me1">szExeName</span><span class="br0">&#41;</span><span class="sy4">;</span></div></li><li class="li1"><div class="de1">						runExe<span class="br0">&#40;</span>_Tasks<span class="br0">&#91;</span>iTask<span class="br0">&#93;</span>.<span class="me1">szExeName</span>, _Tasks<span class="br0">&#91;</span>iTask<span class="br0">&#93;</span>.<span class="me1">szArgs</span><span class="br0">&#41;</span><span class="sy4">;</span></div></li><li class="li1"><div class="de1">					<span class="br0">&#125;</span></div></li><li class="li1"><div class="de1">					<span class="kw1">else</span><span class="br0">&#123;</span></div></li><li class="li1"><div class="de1">						nclog<span class="br0">&#40;</span>L<span class="st0">&quot;Skipping start of exe '%s' as not on AC power<span class="es1">\n</span>&quot;</span>, _Tasks<span class="br0">&#91;</span>iTask<span class="br0">&#93;</span>.<span class="me1">szExeName</span><span class="br0">&#41;</span><span class="sy4">;</span></div></li><li class="li1"><div class="de1">					<span class="br0">&#125;</span></div></li><li class="li1"><div class="de1">				<span class="br0">&#125;</span></div></li><li class="li1"><div class="de1">				<span class="kw1">else</span><span class="br0">&#123;</span></div></li><li class="li1"><div class="de1">					nclog<span class="br0">&#40;</span>L<span class="st0">&quot;Starting exe '%s'<span class="es1">\n</span>&quot;</span>, _Tasks<span class="br0">&#91;</span>iTask<span class="br0">&#93;</span>.<span class="me1">szExeName</span><span class="br0">&#41;</span><span class="sy4">;</span></div></li><li class="li1"><div class="de1">					runExe<span class="br0">&#40;</span>_Tasks<span class="br0">&#91;</span>iTask<span class="br0">&#93;</span>.<span class="me1">szExeName</span>, _Tasks<span class="br0">&#91;</span>iTask<span class="br0">&#93;</span>.<span class="me1">szArgs</span><span class="br0">&#41;</span><span class="sy4">;</span></div></li><li class="li1"><div class="de1">				<span class="br0">&#125;</span></div></li><li class="li1"><div class="de1">			<span class="br0">&#125;</span></div></li><li class="li1"><div class="de1">			<span class="kw1">else</span><span class="br0">&#123;</span> <span class="co1">// a stop task</span></div></li><li class="li1"><div class="de1">				<span class="co1">//now kill the task's exe</span></div></li><li class="li1"><div class="de1">				nclog<span class="br0">&#40;</span>L<span class="st0">&quot;Killing exe '%s'<span class="es1">\n</span>&quot;</span>, _Tasks<span class="br0">&#91;</span>iTask<span class="br0">&#93;</span>.<span class="me1">szExeName</span><span class="br0">&#41;</span><span class="sy4">;</span></div></li><li class="li1"><div class="de1">				DWORD iKillRes <span class="sy1">=</span> killExe<span class="br0">&#40;</span>_Tasks<span class="br0">&#91;</span>iTask<span class="br0">&#93;</span>.<span class="me1">szExeName</span><span class="br0">&#41;</span><span class="sy4">;</span></div></li><li class="li1"><div class="de1">				<span class="kw1">switch</span> <span class="br0">&#40;</span>iKillRes<span class="br0">&#41;</span><span class="br0">&#123;</span></div></li><li class="li1"><div class="de1">					<span class="kw1">case</span> ERROR_NOT_FOUND<span class="sy4">:</span></div></li><li class="li1"><div class="de1">						nclog<span class="br0">&#40;</span>L<span class="st0">&quot;<span class="es1">\t</span>exe not running<span class="es1">\n</span>&quot;</span><span class="br0">&#41;</span><span class="sy4">;</span></div></li><li class="li1"><div class="de1">						<span class="kw1">break</span><span class="sy4">;</span></div></li><li class="li1"><div class="de1">					<span class="kw1">case</span> <span class="nu0">0</span><span class="sy4">:</span></div></li><li class="li1"><div class="de1">						nclog<span class="br0">&#40;</span>L<span class="st0">&quot;<span class="es1">\t</span>exe killed<span class="es1">\n</span>&quot;</span><span class="br0">&#41;</span><span class="sy4">;</span></div></li><li class="li1"><div class="de1">						<span class="kw1">break</span><span class="sy4">;</span></div></li><li class="li1"><div class="de1">					<span class="kw1">default</span><span class="sy4">:</span></div></li><li class="li1"><div class="de1">						nclog<span class="br0">&#40;</span>L<span class="st0">&quot;unable to kill exe. GetLastError=%08x<span class="es1">\n</span>&quot;</span>, iKillRes<span class="br0">&#41;</span><span class="sy4">;</span></div></li><li class="li1"><div class="de1">						<span class="kw1">break</span><span class="sy4">;</span></div></li><li class="li1"><div class="de1">				<span class="br0">&#125;</span></div></li><li class="li1"><div class="de1">			<span class="br0">&#125;</span></div></li><li class="li1"><div class="de1">		<span class="br0">&#125;</span></div></li><li class="li1"><div class="de1">		<span class="kw1">else</span><span class="br0">&#123;</span></div></li><li class="li1"><div class="de1">			nclog<span class="br0">&#40;</span>L<span class="st0">&quot;Exec/Kill skipped as this is a delayed schedule<span class="es1">\n</span>&quot;</span><span class="br0">&#41;</span><span class="sy4">;</span></div></li><li class="li1"><div class="de1">		<span class="br0">&#125;</span></div></li><li class="li1"><div class="de1">	<span class="br0">&#125;</span></div></li><li class="li1"><div class="de1">	<span class="kw1">else</span></div></li><li class="li1"><div class="de1">		nclog<span class="br0">&#40;</span>L<span class="st0">&quot;<span class="es1">\t</span>task %i is inactive (0x%02x)<span class="es1">\n</span>&quot;</span>, iTask, _Tasks<span class="br0">&#91;</span>iTask<span class="br0">&#93;</span>.<span class="me1">iActive</span><span class="br0">&#41;</span><span class="sy4">;</span></div></li><li class="li1"><div class="de1">&nbsp;</div></li><li class="li1"><div class="de1">		<span class="kw1">return</span> iReturn<span class="sy4">;</span></div></li><li class="li1"><div class="de1"><span class="br0">&#125;</span></div></li></ol></pre></div></div>
<h2> Tasker2 control</h2>
<p>Although you normally dont need to run tasker2 manually, I have added some command line arguments:</p>
<p>&#8220;-c&#8221;    instructs tasker2.exe to remove all tasker2 schedules of the scheduler database<br />
&#8220;-r taskX&#8221;    deactivate processing of task with number X, sets the active flag to 0<br />
&#8220;-a taskX&#8221;    activate processing of task number X, sets the active flag to 1<br />
&#8220;-d&#8221;    dump a list of all active notifications of the windows mobile scheduler</p>
<p>Do not use -s taskX and -k taskX except for testing. The args &#8216;-s taskX&#8217; and &#8216;-k taskX&#8217; are only be used by the scheduler.</p>
<h2>Log file</h2>
<p>The log file will log all activities of tasker2 in the directory of tasker2.exe. It will grow until 1MB and then one log backup file is saved. So you may have two log files, one active and one backup of the previous log.</p>
<div id="wpshdo_9" class="wp-synhighlighter-outer"><div id="wpshdt_9" class="wp-synhighlighter-expanded"><table border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_9"></a><a id="wpshat_9" class="wp-synhighlighter-title" href="#codesyntax_9"  onClick="javascript:wpsh_toggleBlock(9)" title="Click to show/hide code block">Source code</a></td><td align="right"><a href="#codesyntax_9" onClick="javascript:wpsh_code(9)" title="Show code only"><img border="0" style="border: 0 none" src="http://www.hjgode.de/wp/wp-content/plugins/wp-synhighlight/themes/default/images/code.png" /></a>&nbsp;<a href="#codesyntax_9" onClick="javascript:wpsh_print(9)" title="Print code"><img border="0" style="border: 0 none" src="http://www.hjgode.de/wp/wp-content/plugins/wp-synhighlight/themes/default/images/printer.png" /></a>&nbsp;<a href="http://www.hjgode.de/wp/wp-content/plugins/wp-synhighlight/About.html" target="_blank" title="Show plugin information"><img border="0" style="border: 0 none" src="http://www.hjgode.de/wp/wp-content/plugins/wp-synhighlight/themes/default/images/info.gif" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_9" class="wp-synhighlighter-inner" style="display: block;"><pre class="dos" style="font-family:monospace;"><ol><li class="li1"><div class="de1">0xfacbcab2: ++++++++++++++++ Tasker v300 started +++++++++++++++++++</div></li><li class="li1"><div class="de1">0xfacbcab2: Checking <a href="http://www.ss64.com/nt/for.html"><span class="kw1">for</span></a> Mutex <span class="br0">&#40;</span>single instance allowed only<span class="br0">&#41;</span>...</div></li><li class="li1"><div class="de1">0xfacbcab2: 	Created new mutex</div></li><li class="li1"><div class="de1">0xfacbcab2: ~~~ using actual localtime:</div></li><li class="li1"><div class="de1">0xfacbcab2: 	 23.12.2011, 12:28</div></li><li class="li1"><div class="de1">0xfacbcab2: CmdLine =</div></li><li class="li1"><div class="de1">0xfacbcab2: Checking <a href="http://www.ss64.com/nt/for.html"><span class="kw1">for</span></a> valid date/time...</div></li><li class="li1"><div class="de1">0xfacbcab2: Date/Time after 11 2011. OK</div></li><li class="li1"><div class="de1">0xfacbcab2: Clearing Event Notifications...0xfacbcab2: OK</div></li><li class="li1"><div class="de1">0xfacbcab2: ClearRunApp<span class="br0">&#40;</span><span class="br0">&#41;</span>: ...</div></li><li class="li1"><div class="de1">0xfacbcab2: ClearRunApp<span class="br0">&#40;</span><span class="br0">&#41;</span>: CeClearUserNotification <a href="http://www.ss64.com/nt/for.html"><span class="kw1">for</span></a> handle: 0x3d00000f</div></li><li class="li1"><div class="de1">0xfacbcab2: ClearRunApp<span class="br0">&#40;</span><span class="br0">&#41;</span>: CeClearUserNotification <a href="http://www.ss64.com/nt/for.html"><span class="kw1">for</span></a> handle: 0x33000025</div></li><li class="li1"><div class="de1">0xfacbcab2: ClearRunApp<span class="br0">&#40;</span><span class="br0">&#41;</span>: CeClearUserNotification <a href="http://www.ss64.com/nt/for.html"><span class="kw1">for</span></a> handle: 0x3800002a</div></li><li class="li1"><div class="de1">0xfacbcab2: ClearRunApp<span class="br0">&#40;</span><span class="br0">&#41;</span>: CeClearUserNotification <a href="http://www.ss64.com/nt/for.html"><span class="kw1">for</span></a> handle: 0x3b00001b</div></li><li class="li1"><div class="de1">0xfacbcab2: ClearRunApp<span class="br0">&#40;</span><span class="br0">&#41;</span>: CeClearUserNotification <a href="http://www.ss64.com/nt/for.html"><span class="kw1">for</span></a> handle: 0x3800002e</div></li><li class="li1"><div class="de1">0xfacbcab2: ClearRunApp<span class="br0">&#40;</span><span class="br0">&#41;</span>: CeClearUserNotification <a href="http://www.ss64.com/nt/for.html"><span class="kw1">for</span></a> handle: 0x3f00001e</div></li><li class="li1"><div class="de1">0xfacbcab2: ClearRunApp<span class="br0">&#40;</span><span class="br0">&#41;</span>: CeClearUserNotification <a href="http://www.ss64.com/nt/for.html"><span class="kw1">for</span></a> handle: 0x37000016</div></li><li class="li1"><div class="de1">0xfacbcab2: ClearRunApp<span class="br0">&#40;</span><span class="br0">&#41;</span>: CeClearUserNotification <a href="http://www.ss64.com/nt/for.html"><span class="kw1">for</span></a> handle: 0x3a000030</div></li><li class="li1"><div class="de1">0xfacbcab2: ClearRunApp<span class="br0">&#40;</span><span class="br0">&#41;</span>: returns 8</div></li><li class="li1"><div class="de1">0xfacbcab2: Cleared 8 Tasker schedules</div></li><li class="li1"><div class="de1">0xfacbcab2: scheduleAllTasks: ClearAllSchedules <a href="http://www.ss64.com/nt/for.html"><span class="kw1">for</span></a> 8 tasks</div></li><li class="li1"><div class="de1">0xfacbcab2: Clearing Event Notifications...0xfacbcab2: Clearing Event Notifications...0xfacbcab2: OK</div></li><li class="li1"><div class="de1">0xfacbcab2: Adding Time_Change Event Notification...0xfacbcab2: OK</div></li><li class="li1"><div class="de1">0xfacbcab2: Adding TZ_Change Event Notification...0xfacbcab2: OK</div></li><li class="li1"><div class="de1">0xfacbcab2: Creating new Start Task schedule <a href="http://www.ss64.com/nt/for.html"><span class="kw1">for</span></a> '\Windows\notes.exe' <a href="http://www.ss64.com/nt/in.html"><span class="kw1">in</span></a> Task1</div></li><li class="li1"><div class="de1">0xfacbcab2: 	calculating new schedule <a href="http://www.ss64.com/nt/for.html"><span class="kw1">for</span></a> '201112231300'...</div></li><li class="li1"><div class="de1">0xfacbcab2: 	interval is: 0d01h00m</div></li><li class="li1"><div class="de1">0xfacbcab2: 	schedule adjusted to '201112231300'</div></li><li class="li1"><div class="de1">0xfacbcab2: 	ScheduleRunApp: Next run at: 23.12.2011 13:00:56</div></li><li class="li1"><div class="de1">0xfacbcab2: 	ScheduleRunApp: CeSetUserNotificationEx succeeded...</div></li><li class="li1"><div class="de1">0xfacbcab2: Creating new Kill Task schedule <a href="http://www.ss64.com/nt/for.html"><span class="kw1">for</span></a> '\Windows\notes.exe' <a href="http://www.ss64.com/nt/in.html"><span class="kw1">in</span></a> Task1</div></li><li class="li1"><div class="de1">0xfacbcab2: 	calculating new schedule <a href="http://www.ss64.com/nt/for.html"><span class="kw1">for</span></a> '<span class="nu0">201112231300</span>'...</div></li><li class="li1"><div class="de1">0xfacbcab2: 	interval is: 0d01h00m</div></li><li class="li1"><div class="de1">0xfacbcab2: 	schedule adjusted to '<span class="nu0">201112231300</span>'</div></li><li class="li1"><div class="de1">0xfacbcab2: 	ScheduleRunApp: Next run at: 23.12.2011 <span class="nu0">13</span>:00:<span class="nu0">56</span></div></li><li class="li1"><div class="de1">0xfacbcab2: 	ScheduleRunApp: CeSetUserNotificationEx succeeded...</div></li><li class="li1"><div class="de1">...</div></li></ol></pre></div></div>
<p>The first entry in the log file is the current logging instance. As multiple instances may write randomly at the log, the instance number is needed to idetify which instance has written the current log line.</p>
<h2>Changes</h2>
<p>There are two variants of tasker2, one is using SYSTEMTIME and the other, new one uses time_t. I switched to time_t as it is more easy to do operations like add-one-day with time_t vars than with SYSTEMTIME.</p>
<p>The old variant (v234a) is available as a branch in the code repository: http://code.google.com/p/tasker2/source/browse/#svn%2Fbranch%2Fversion232%2FTasker</p>
<h2>Tests</h2>
<p>Fortunately I had great help by a tester of the software. Many thanks to Thomas B.</p>
<p>I built my only automatic test suite using batch files and a special build of tasker2.exe. If you uncomment the line //#define TESTMODE at the beginning of tasker2.cpp, the compiled app will be in test mode. That means it will not add or remove schedules to/from the windows mobile scheduler. There is another tool used in the test_run.bat that sets the date and time of the device remotely (ActiveSync or Windows Mobile Device Center connection).</p>
<p>The automatic test uses the great tools of itsutils and will set registry values, change date/time, launch tasker2, get the log and build a merged log with all essential data to check the function of tasker2:</p>
<p>http://code.google.com/p/tasker2/source/browse/#svn%2Ftrunk%2FTasker%2Ftest</p>
<p>Here is a snippet from the test_bat.bat:</p>
<div id="wpshdo_10" class="wp-synhighlighter-outer"><div id="wpshdt_10" class="wp-synhighlighter-expanded"><table border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_10"></a><a id="wpshat_10" class="wp-synhighlighter-title" href="#codesyntax_10"  onClick="javascript:wpsh_toggleBlock(10)" title="Click to show/hide code block">Source code</a></td><td align="right"><a href="#codesyntax_10" onClick="javascript:wpsh_code(10)" title="Show code only"><img border="0" style="border: 0 none" src="http://www.hjgode.de/wp/wp-content/plugins/wp-synhighlight/themes/default/images/code.png" /></a>&nbsp;<a href="#codesyntax_10" onClick="javascript:wpsh_print(10)" title="Print code"><img border="0" style="border: 0 none" src="http://www.hjgode.de/wp/wp-content/plugins/wp-synhighlight/themes/default/images/printer.png" /></a>&nbsp;<a href="http://www.hjgode.de/wp/wp-content/plugins/wp-synhighlight/About.html" target="_blank" title="Show plugin information"><img border="0" style="border: 0 none" src="http://www.hjgode.de/wp/wp-content/plugins/wp-synhighlight/themes/default/images/info.gif" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_10" class="wp-synhighlighter-inner" style="display: block;"><pre class="php" style="font-family:monospace;"><ol><li class="li1"><div class="de1"><span class="sy0">@</span><span class="kw1">echo</span> off</div></li><li class="li1"><div class="de1">&nbsp;</div></li><li class="li1"><div class="de1"><span class="kw1">ECHO</span> <span class="co2">############## START ###############</span></div></li><li class="li1"><div class="de1"><span class="kw1">echo</span>  MAKE SHURE THE RADIOS ARE OFF TO</div></li><li class="li1"><div class="de1"><span class="kw1">echo</span>  AVOID AUTOMATIC <a href="http://www.php.net/time"><span class="kw3">TIME</span></a> SYNCS<span class="sy0">!</span></div></li><li class="li1"><div class="de1"><span class="kw1">echo</span> <span class="sy0">.</span></div></li><li class="li1"><div class="de1">PAUSE Press any <a href="http://www.php.net/key"><span class="kw3">key</span></a> to start</div></li><li class="li1"><div class="de1">&nbsp;</div></li><li class="li1"><div class="de1"><span class="kw1">ECHO</span> <span class="co2">############## START ############### &gt;test_run.txt</span></div></li><li class="li1"><div class="de1">&nbsp;</div></li><li class="li1"><div class="de1"><span class="kw1">echo</span> Importing test reg keys<span class="sy0">...</span></div></li><li class="li1"><div class="de1"><span class="kw1">echo</span> Importing test reg keys<span class="sy0">...</span> <span class="sy0">&gt;&gt;</span>test_run<span class="sy0">.</span>txt</div></li><li class="li1"><div class="de1">pregutl <span class="sy0">@</span>tasker2<span class="sy0">.</span>reg <span class="sy0">&gt;&gt;</span>test_run<span class="sy0">.</span>txt</div></li><li class="li1"><div class="de1">&nbsp;</div></li><li class="li1"><div class="de1">pdel \tasker2<span class="sy0">.</span>exe<span class="sy0">.</span><a href="http://www.php.net/log"><span class="kw3">log</span></a><span class="sy0">.</span>txt <span class="sy0">&gt;</span>NUL</div></li><li class="li1"><div class="de1">pput <span class="sy0">-</span>f <span class="sy0">./</span>tasker2<span class="sy0">.</span>exe \tasker2<span class="sy0">.</span>exe</div></li><li class="li1"><div class="de1">&nbsp;</div></li><li class="li1"><div class="de1"><span class="kw1">ECHO</span> TEST1<span class="sy0">...</span></div></li><li class="li1"><div class="de1"><span class="kw1">ECHO</span> 	set <a href="http://www.php.net/time"><span class="kw3">time</span></a> manually to 01<span class="sy0">.</span>01<span class="sy0">.</span>2003 12<span class="sy0">:</span>00</div></li><li class="li1"><div class="de1"><span class="kw1">echo</span> 	run tasker2<span class="sy0">.</span>exe</div></li><li class="li1"><div class="de1"><span class="kw1">ECHO</span> <span class="sy0">++++++++++++++</span> TEST1 <span class="sy0">++++++++++++++++</span> <span class="sy0">&gt;&gt;</span>test_run<span class="sy0">.</span>txt</div></li><li class="li1"><div class="de1">pregutl HKLM\Software\Tasker  <span class="sy0">&gt;&gt;</span>test_run<span class="sy0">.</span>txt</div></li><li class="li1"><div class="de1"><span class="kw1">ECHO</span> <span class="sy0">-------------------------------------</span> <span class="sy0">&gt;&gt;</span>test_run<span class="sy0">.</span>txt</div></li><li class="li1"><div class="de1"><span class="kw1">ECHO</span> set <a href="http://www.php.net/time"><span class="kw3">time</span></a> manually to 01<span class="sy0">.</span>01<span class="sy0">.</span>2003 12<span class="sy0">:</span>00 <span class="sy0">&gt;&gt;</span>test_run<span class="sy0">.</span>txt</div></li><li class="li1"><div class="de1"><span class="kw1">ECHO</span> <span class="sy0">-------------------------------------</span> <span class="sy0">&gt;&gt;</span>test_run<span class="sy0">.</span>txt</div></li><li class="li1"><div class="de1">prun \SetDateTime<span class="sy0">.</span>exe 200301011200</div></li><li class="li1"><div class="de1">CALL <span class="sy0">:</span>MYWAIT</div></li><li class="li1"><div class="de1">prun \tasker2<span class="sy0">.</span>exe</div></li><li class="li1"><div class="de1"><span class="kw1">ECHO</span> <span class="st0">&quot;############# Result:&quot;</span> <span class="sy0">&gt;&gt;</span>test_run<span class="sy0">.</span>txt</div></li><li class="li1"><div class="de1">pregutl HKLM\Software\Tasker <span class="sy0">&gt;&gt;</span>test_run<span class="sy0">.</span>txt</div></li><li class="li1"><div class="de1"><span class="kw1">ECHO</span> <span class="sy0">***************</span> <a href="http://www.php.net/log"><span class="kw3">LOG</span></a>  <span class="sy0">****************</span> <span class="sy0">&gt;&gt;</span>test_run<span class="sy0">.</span>txt</div></li><li class="li1"><div class="de1">pget <span class="sy0">-</span>f \tasker2<span class="sy0">.</span>exe<span class="sy0">.</span><a href="http://www.php.net/log"><span class="kw3">log</span></a><span class="sy0">.</span>txt</div></li><li class="li1"><div class="de1">type tasker2<span class="sy0">.</span>exe<span class="sy0">.</span><a href="http://www.php.net/log"><span class="kw3">log</span></a><span class="sy0">.</span>txt <span class="sy0">&gt;&gt;</span>test_run<span class="sy0">.</span>txt</div></li><li class="li1"><div class="de1">pdel \tasker2<span class="sy0">.</span>exe<span class="sy0">.</span><a href="http://www.php.net/log"><span class="kw3">log</span></a><span class="sy0">.</span>txt</div></li><li class="li1"><div class="de1"><span class="kw1">ECHO</span> <span class="sy0">---------------</span>TEST1  <span class="sy0">---------------</span> <span class="sy0">&gt;&gt;</span>test_run<span class="sy0">.</span>txt</div></li><li class="li1"><div class="de1"><span class="kw1">ECHO</span> <span class="sy0">.&gt;&gt;</span>test_run<span class="sy0">.</span>txt</div></li></ol></pre></div></div>
<h2>Downloads</h2>
<p>The full tasker2 source code is available at http://code.google.com/p/tasker2/source/browse</p>
<p>Tool to look at the scheduler database [NotificationList]: <b>DOWNLOAD:</b><a href="http://www.hjgode.de/wp/wp-content/plugins/download-monitor/download.php?id=149" title="Downloaded 23 times">NotificationList</a> - A tool to list notifications (Hits: 23, size: 153.42 kB)</p>
<p>&nbsp;</p>
<!-- Social Bookmarks BEGIN -->
<div class="social_bookmark">
<a><strong><em>Bookmark It</em></strong></a>
<br />
<div class="d">
<br />
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://del.icio.us/post?url=http%3A%2F%2Fwww.hjgode.de%2Fwp%2F2011%2F12%2F23%2Fwindows-mobile-tasker2-runs-and-stops-applications-periodically%2F&amp;title=Windows+Mobile+%26%238211%3B+tasker2+runs+and+stops+applications+periodically" rel="nofollow" title="Add to&nbsp;Del.icio.us"><img class="social_img" src="http://www.hjgode.de/wp/wp-content/plugins/social-bookmarks0/images/delicious.png" title="Add to&nbsp;Del.icio.us" alt="Add to&nbsp;Del.icio.us" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.hjgode.de%2Fwp%2F2011%2F12%2F23%2Fwindows-mobile-tasker2-runs-and-stops-applications-periodically%2F&amp;title=Windows+Mobile+%26%238211%3B+tasker2+runs+and+stops+applications+periodically" rel="nofollow" title="Add to&nbsp;digg"><img class="social_img" src="http://www.hjgode.de/wp/wp-content/plugins/social-bookmarks0/images/digg.png" title="Add to&nbsp;digg" alt="Add to&nbsp;digg" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.google.com/bookmarks/mark?op=edit&amp;output=popup&amp;bkmk=http%3A%2F%2Fwww.hjgode.de%2Fwp%2F2011%2F12%2F23%2Fwindows-mobile-tasker2-runs-and-stops-applications-periodically%2F&amp;title=Windows+Mobile+%26%238211%3B+tasker2+runs+and+stops+applications+periodically" rel="nofollow" title="Add to&nbsp;Google Bookmarks"><img class="social_img" src="http://www.hjgode.de/wp/wp-content/plugins/social-bookmarks0/images/google.png" title="Add to&nbsp;Google Bookmarks" alt="Add to&nbsp;Google Bookmarks" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.netscape.com/submit/?U=http%3A%2F%2Fwww.hjgode.de%2Fwp%2F2011%2F12%2F23%2Fwindows-mobile-tasker2-runs-and-stops-applications-periodically%2F&amp;T=Windows+Mobile+%26%238211%3B+tasker2+runs+and+stops+applications+periodically" rel="nofollow" title="Add to&nbsp;Netscape"><img class="social_img" src="http://www.hjgode.de/wp/wp-content/plugins/social-bookmarks0/images/netscape.png" title="Add to&nbsp;Netscape" alt="Add to&nbsp;Netscape" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.technorati.com/faves?add=http%3A%2F%2Fwww.hjgode.de%2Fwp%2F2011%2F12%2F23%2Fwindows-mobile-tasker2-runs-and-stops-applications-periodically%2F" rel="nofollow" title="Add to&nbsp;Technorati"><img class="social_img" src="http://www.hjgode.de/wp/wp-content/plugins/social-bookmarks0/images/technorati.png" title="Add to&nbsp;Technorati" alt="Add to&nbsp;Technorati" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://myweb2.search.yahoo.com/myresults/bookmarklet?u=http%3A%2F%2Fwww.hjgode.de%2Fwp%2F2011%2F12%2F23%2Fwindows-mobile-tasker2-runs-and-stops-applications-periodically%2F&amp;t=Windows+Mobile+%26%238211%3B+tasker2+runs+and+stops+applications+periodically" rel="nofollow" title="Add to&nbsp;Yahoo My Web"><img class="social_img" src="http://www.hjgode.de/wp/wp-content/plugins/social-bookmarks0/images/yahoo.png" title="Add to&nbsp;Yahoo My Web" alt="Add to&nbsp;Yahoo My Web" /></a>
<br />
</div>
</div>
<!-- Social Bookmarks END -->
]]></content:encoded>
			<wfw:commentRss>http://www.hjgode.de/wp/2011/12/23/windows-mobile-tasker2-runs-and-stops-applications-periodically/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Windows Mobile &#8211; the no-go world of Function Keys</title>
		<link>http://www.hjgode.de/wp/2011/12/20/windows-mobile-the-no-go-world-of-function-keys/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=windows-mobile-the-no-go-world-of-function-keys</link>
		<comments>http://www.hjgode.de/wp/2011/12/20/windows-mobile-the-no-go-world-of-function-keys/#comments</comments>
		<pubDate>Tue, 20 Dec 2011 09:07:06 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[CodeProject]]></category>
		<category><![CDATA[Int*rm*c]]></category>
		<category><![CDATA[Keyboard]]></category>
		<category><![CDATA[kiosk mode]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[Windows Mobile Information]]></category>
		<category><![CDATA[AllKeys]]></category>
		<category><![CDATA[Function Key]]></category>
		<category><![CDATA[Internet Explorer Mobile]]></category>
		<category><![CDATA[remote desktop mobile]]></category>
		<category><![CDATA[UnregisterFunc1]]></category>
		<category><![CDATA[windows mobile]]></category>

		<guid isPermaLink="false">http://www.hjgode.de/wp/?p=1274</guid>
		<description><![CDATA[Hello I want to summarize the role of function keys in Windows Mobile, former Pocket PC, as I got several questions each week on how to use or enable Function keys in this or that application. Here is a simple information about how function keys work in Windows Mobile. As example you have a web [...]]]></description>
			<content:encoded><![CDATA[<p>Hello</p>
<p><span style="background-color: #c0c0c0;">I want to summarize the role of <span style="color: #ff0000;"><strong>function keys in Windows Mobile</strong></span>, former Pocket PC, as I got several questions each week on how to use or enable Function keys in this or that application.</span></p>
<p><span style="background-color: #c0c0c0;">Here is a simple information about <span style="color: #ff0000;">how function keys work in Windows Mobile</span>.</span></p>
<p><span id="more-1274"></span>As example you have a web application which shows F3 and F4 as shortcuts to previous/next page:</p>
<div id="attachment_1275" class="wp-caption alignnone" style="width: 250px"><a href="http://www.hjgode.de/wp/2011/12/20/windows-mobile-the-no-go-world-of-function-keys/test_not_ok-htm-in_ib_pie/" rel="attachment wp-att-1275"><img class="size-full wp-image-1275" title="SAP ITS Mobile screen Intermec Browser" src="http://www.hjgode.de/wp/wp-content/uploads/2011/12/test_not_ok.htm.in_IB_PIE.gif" alt="SAP ITS Mobile screen Intermec Browser" width="240" height="320" /></a><p class="wp-caption-text">SAP ITS Mobile screen Intermec Browser</p></div>
<p>Without some prepare this screen will not react on function keys! As the screen shows Intermec Browser (IB) with a SAP ITS Mobile form, you are able to define settings in IB to be able to really use the Function Keys.</p>
<p>Windows Mobile uses Function Key values for its own purpose. The usage can be retrieved by looking at winuserm.h of a Windows Mobile SDK:</p>
<div id="wpshdo_11" class="wp-synhighlighter-outer"><div id="wpshdt_11" class="wp-synhighlighter-expanded"><table border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_11"></a><a id="wpshat_11" class="wp-synhighlighter-title" href="#codesyntax_11"  onClick="javascript:wpsh_toggleBlock(11)" title="Click to show/hide code block">Source code</a></td><td align="right"><a href="#codesyntax_11" onClick="javascript:wpsh_code(11)" title="Show code only"><img border="0" style="border: 0 none" src="http://www.hjgode.de/wp/wp-content/plugins/wp-synhighlight/themes/default/images/code.png" /></a>&nbsp;<a href="#codesyntax_11" onClick="javascript:wpsh_print(11)" title="Print code"><img border="0" style="border: 0 none" src="http://www.hjgode.de/wp/wp-content/plugins/wp-synhighlight/themes/default/images/printer.png" /></a>&nbsp;<a href="http://www.hjgode.de/wp/wp-content/plugins/wp-synhighlight/About.html" target="_blank" title="Show plugin information"><img border="0" style="border: 0 none" src="http://www.hjgode.de/wp/wp-content/plugins/wp-synhighlight/themes/default/images/info.gif" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_11" class="wp-synhighlighter-inner" style="display: block;"><pre class="cpp" style="font-family:monospace;"><ol><li class="li1"><div class="de1"><span class="co1">//winuserm.h</span></div></li><li class="li1"><div class="de1">...</div></li><li class="li1"><div class="de1"><span class="co2">#define VK_TSOFT1   VK_F1               // Softkey 1</span></div></li><li class="li1"><div class="de1"><span class="co2">#define VK_TSOFT2   VK_F2               // Softkey 2</span></div></li><li class="li1"><div class="de1"><span class="co2">#define VK_TTALK    VK_F3               // Talk</span></div></li><li class="li1"><div class="de1"><span class="co2">#define VK_TEND     VK_F4               // End</span></div></li><li class="li1"><div class="de1">...</div></li><li class="li1"><div class="de1"><span class="co2">#define VK_TRECORD      VK_F10          // Record</span></div></li><li class="li1"><div class="de1"><span class="co2">#define VK_TFLIP        VK_F17          // Flip</span></div></li><li class="li1"><div class="de1"><span class="co2">#define VK_TPOWER       VK_F18          // Power</span></div></li><li class="li1"><div class="de1"><span class="co2">#define VK_TVOLUMEUP    VK_F6           // Volume Up</span></div></li><li class="li1"><div class="de1"><span class="co2">#define VK_TVOLUMEDOWN  VK_F7           // Volume Down</span></div></li><li class="li1"><div class="de1">...</div></li><li class="li1"><div class="de1"><span class="co2">#define VK_TSPEAKERPHONE_TOGGLE VK_F16</span></div></li><li class="li1"><div class="de1"><span class="co2">#define VK_END_ALL_DATA_CALLS   VK_F15</span></div></li><li class="li1"><div class="de1">...</div></li><li class="li1"><div class="de1"><span class="co2">#define VK_TSTAR    VK_F8               // *</span></div></li><li class="li1"><div class="de1"><span class="co2">#define VK_TPOUND   VK_F9               // #</span></div></li><li class="li1"><div class="de1">...</div></li><li class="li1"><div class="de1"><span class="co2">#define VK_SYMBOL   VK_F11              // Symbol (SYM) key</span></div></li><li class="li1"><div class="de1">&nbsp;</div></li><li class="li1"><div class="de1"><span class="co2">#define VK_REDKEY   VK_F19              // Sent by a keypad that has a special red function key</span></div></li><li class="li1"><div class="de1"><span class="co2">#define VK_ROCKER   VK_F20              // Arrow keys came from a Rocker</span></div></li><li class="li1"><div class="de1"><span class="co2">#define VK_DPAD     VK_F21              // Arrow keys came from a DPAD</span></div></li><li class="li1"><div class="de1"><span class="co2">#define VK_ACTION   VK_F23              // Sent with VK_RETURN when doing Action on PPC rockers</span></div></li><li class="li1"><div class="de1">&nbsp;</div></li><li class="li1"><div class="de1"><span class="co2">#define VK_VOICEDIAL  VK_F24            // Key used to kick off voice dial recognition</span></div></li><li class="li1"><div class="de1"><span class="co2">#define VK_KEYLOCK    VK_F22            // Key used to lock the device</span></div></li><li class="li1"><div class="de1"><span class="co2">#define VK_KEYUNLOCK  VK_F25             // Key used to unlock the key lock</span></div></li><li class="li1"><div class="de1">&nbsp;</div></li><li class="li1"><div class="de1"><span class="co1">// Chorded keys.  DONE is VK_RWIN + VK_F6 and MOJI is VK_RWIN + VK_F7</span></div></li><li class="li1"><div class="de1"><span class="co2">#define VK_DONE     VK_F6                 // &lt;OK/Close&gt; hotkey code</span></div></li><li class="li1"><div class="de1"><span class="co2">#define MOD_DONE    (MOD_WIN | MOD_KEYUP) // &lt;OK/Close&gt; hotkey modifiers</span></div></li><li class="li1"><div class="de1">&nbsp;</div></li><li class="li1"><div class="de1"><span class="co2">#define VK_MOJI     VK_F7                  // Key used to switch between FE language layouts</span></div></li><li class="li1"><div class="de1"><span class="co2">#define MOD_MOJI    (MOD_WIN | MOD_KEYUP)  //Modifiers so MOJI goes to the shell</span></div></li><li class="li1"><div class="de1">...</div></li></ol></pre></div></div>
<p>You see that many FunctionKey values are assigned to OS specific functions like Phone, END, Volume Up/Down etc.</p>
<p>So, you can normally not use Function Keys in your application to provide shortcuts to function calls. This is also true for client applications like Terminal Emulators (TE) like NaurTechTE and Intermec TE (ITE), browser based applications like Internet Explorer Mobile or Intermec Kiosk Mode Browser (IB), thin clients like Java client apps (ie. SAP ITS Mobile) or Remote Desktop client apps (ie Remote Desktop Mobile, zaDesktop).</p>
<p>Some of the kiosk mode apps provide a way to enable you to use Function Keys (see example at top). They can do so, as they use API calls like UnregisterFunc1 or AllKeys(TRUE) or GXOpenInput (deprecated!). These APIs instruct Windows Mobile OS to NOT catch and use Function Keys but handle them like &#8216;normal&#8217; keys.</p>
<p>If you are the coder of an application using CPP, CSharp (C#), VB.NET, CPP or JAVA, you can use the Microsoft API function AllKeys(TRUE) in your code and Windows Mobile will not tamper the function keys.</p>
<p>If you are not the coder you may use UnregisterFunc1 (see my post &#8220;<a title="Free up your function keys" href="http://www.hjgode.de/wp/2010/02/10/use-funckey-to-free-up-your-functionkeys-on-windows-mobile/">Freedom for Function Keys</a>&#8220;). But be warned, there are applications that even then will not process Function Keys or do not forward them. For example Internet Explorer Mobile (IEM) will NOT process Function Keys except for internal functions like help or full-screen. Another bad example is Remote Desktop Mobile (RDM). It does not support Function Keys, even if you un-register them before you launch RDM, Function Keys will NOT be processed or transmitted to the host application. An alternative to RDM with function key support is <a href="http://www.hjgode.de/wp/2010/11/20/mobile-development-a-native-remote-desktop-client-rdesktop-port-win32/">rdesktopCE</a>.</p>
<p>When you use UnregisterFunc1, you can check the Function Keys using a tool like <a title="Keytest3AK" href="http://www.hjgode.de/wp/2009/05/11/keytest3ak-a-tool-to-look-at-keyboard-codes/">KeyTest3AK</a>. It will show the keydown and keyup values of keys and shows what happens if you use AllKeys():</p>
<p><a href="http://www.hjgode.de/wp/2009/05/11/keytest3ak-a-tool-to-look-at-keyboard-codes/screenshot_keytest3ak/" rel="attachment wp-att-615"><img class="alignnone size-full wp-image-615" title="screenshot_keytest3ak" src="http://www.hjgode.de/wp/wp-content/uploads/2009/05/screenshot_keytest3ak.gif" alt="" width="240" height="320" /></a></p>
<p><a href="http://www.hjgode.de/wp/?s=allkeys">More posts about AllKeys</a></p>
<p>&nbsp;</p>
<!-- Social Bookmarks BEGIN -->
<div class="social_bookmark">
<a><strong><em>Bookmark It</em></strong></a>
<br />
<div class="d">
<br />
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://del.icio.us/post?url=http%3A%2F%2Fwww.hjgode.de%2Fwp%2F2011%2F12%2F20%2Fwindows-mobile-the-no-go-world-of-function-keys%2F&amp;title=Windows+Mobile+%26%238211%3B+the+no-go+world+of+Function+Keys" rel="nofollow" title="Add to&nbsp;Del.icio.us"><img class="social_img" src="http://www.hjgode.de/wp/wp-content/plugins/social-bookmarks0/images/delicious.png" title="Add to&nbsp;Del.icio.us" alt="Add to&nbsp;Del.icio.us" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.hjgode.de%2Fwp%2F2011%2F12%2F20%2Fwindows-mobile-the-no-go-world-of-function-keys%2F&amp;title=Windows+Mobile+%26%238211%3B+the+no-go+world+of+Function+Keys" rel="nofollow" title="Add to&nbsp;digg"><img class="social_img" src="http://www.hjgode.de/wp/wp-content/plugins/social-bookmarks0/images/digg.png" title="Add to&nbsp;digg" alt="Add to&nbsp;digg" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.google.com/bookmarks/mark?op=edit&amp;output=popup&amp;bkmk=http%3A%2F%2Fwww.hjgode.de%2Fwp%2F2011%2F12%2F20%2Fwindows-mobile-the-no-go-world-of-function-keys%2F&amp;title=Windows+Mobile+%26%238211%3B+the+no-go+world+of+Function+Keys" rel="nofollow" title="Add to&nbsp;Google Bookmarks"><img class="social_img" src="http://www.hjgode.de/wp/wp-content/plugins/social-bookmarks0/images/google.png" title="Add to&nbsp;Google Bookmarks" alt="Add to&nbsp;Google Bookmarks" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.netscape.com/submit/?U=http%3A%2F%2Fwww.hjgode.de%2Fwp%2F2011%2F12%2F20%2Fwindows-mobile-the-no-go-world-of-function-keys%2F&amp;T=Windows+Mobile+%26%238211%3B+the+no-go+world+of+Function+Keys" rel="nofollow" title="Add to&nbsp;Netscape"><img class="social_img" src="http://www.hjgode.de/wp/wp-content/plugins/social-bookmarks0/images/netscape.png" title="Add to&nbsp;Netscape" alt="Add to&nbsp;Netscape" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.technorati.com/faves?add=http%3A%2F%2Fwww.hjgode.de%2Fwp%2F2011%2F12%2F20%2Fwindows-mobile-the-no-go-world-of-function-keys%2F" rel="nofollow" title="Add to&nbsp;Technorati"><img class="social_img" src="http://www.hjgode.de/wp/wp-content/plugins/social-bookmarks0/images/technorati.png" title="Add to&nbsp;Technorati" alt="Add to&nbsp;Technorati" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://myweb2.search.yahoo.com/myresults/bookmarklet?u=http%3A%2F%2Fwww.hjgode.de%2Fwp%2F2011%2F12%2F20%2Fwindows-mobile-the-no-go-world-of-function-keys%2F&amp;t=Windows+Mobile+%26%238211%3B+the+no-go+world+of+Function+Keys" rel="nofollow" title="Add to&nbsp;Yahoo My Web"><img class="social_img" src="http://www.hjgode.de/wp/wp-content/plugins/social-bookmarks0/images/yahoo.png" title="Add to&nbsp;Yahoo My Web" alt="Add to&nbsp;Yahoo My Web" /></a>
<br />
</div>
</div>
<!-- Social Bookmarks END -->
]]></content:encoded>
			<wfw:commentRss>http://www.hjgode.de/wp/2011/12/20/windows-mobile-the-no-go-world-of-function-keys/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Opencart vqmod &#8211; Telefonnummer bei Registrierung nicht erforderlich</title>
		<link>http://www.hjgode.de/wp/2011/12/15/opencart-vqmod-telefonnummer-bei-registrierung-nicht-erforderlich/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=opencart-vqmod-telefonnummer-bei-registrierung-nicht-erforderlich</link>
		<comments>http://www.hjgode.de/wp/2011/12/15/opencart-vqmod-telefonnummer-bei-registrierung-nicht-erforderlich/#comments</comments>
		<pubDate>Thu, 15 Dec 2011 19:12:47 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[HTML]]></category>
		<category><![CDATA[OpenCart]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[abmahnung]]></category>
		<category><![CDATA[opencart]]></category>
		<category><![CDATA[registrierung]]></category>
		<category><![CDATA[telefonnummer]]></category>
		<category><![CDATA[vqmod]]></category>

		<guid isPermaLink="false">http://www.hjgode.de/wp/?p=1270</guid>
		<description><![CDATA[Anbei ein kleines vqmod file für Opencart 1.5.1.3 (englische und deutsche Sprachdateien) welches die Telefonnumer bei Registrierung als Kunde nicht zwingend erforderlich kennzeichnet. Normalerweise muß ein Neu-Kunde seine Telefonnummer bei der Registrierung angeben. Dies wird durch dieses vqmod file geändert und der Kunde muß keine Telefonnumer angeben, wenn er sich registriert. Das vqmod file einfach [...]]]></description>
			<content:encoded><![CDATA[<p>Anbei ein kleines vqmod file für Opencart 1.5.1.3 (englische und deutsche Sprachdateien) welches die Telefonnumer bei Registrierung als Kunde nicht zwingend erforderlich kennzeichnet.</p>
<p>Normalerweise muß ein Neu-Kunde seine Telefonnummer bei der Registrierung angeben. Dies wird durch dieses vqmod file geändert und der Kunde muß keine Telefonnumer angeben, wenn er sich registriert. Das vqmod file einfach in das Opencart vqmod/xml Verzeichnis kopieren. Wenn was nicht funktioniert, die Datei einfach wieder löschen.</p>
<p><span id="more-1270"></span></p>
<pre></pre>
<div id="wpshdo_12" class="wp-synhighlighter-outer"><div id="wpshdt_12" class="wp-synhighlighter-expanded"><table border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_12"></a><a id="wpshat_12" class="wp-synhighlighter-title" href="#codesyntax_12"  onClick="javascript:wpsh_toggleBlock(12)" title="Click to show/hide code block">vqmod_tel_not_required.xml</a></td><td align="right"><a href="#codesyntax_12" onClick="javascript:wpsh_code(12)" title="Show code only"><img border="0" style="border: 0 none" src="http://www.hjgode.de/wp/wp-content/plugins/wp-synhighlight/themes/default/images/code.png" /></a>&nbsp;<a href="#codesyntax_12" onClick="javascript:wpsh_print(12)" title="Print code"><img border="0" style="border: 0 none" src="http://www.hjgode.de/wp/wp-content/plugins/wp-synhighlight/themes/default/images/printer.png" /></a>&nbsp;<a href="http://www.hjgode.de/wp/wp-content/plugins/wp-synhighlight/About.html" target="_blank" title="Show plugin information"><img border="0" style="border: 0 none" src="http://www.hjgode.de/wp/wp-content/plugins/wp-synhighlight/themes/default/images/info.gif" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_12" class="wp-synhighlighter-inner" style="display: block;"><pre class="php" style="font-family:monospace;"><ol><li class="li1"><div class="de1"><span class="sy1">&lt;?</span>xml version<span class="sy0">=</span><span class="st0">&quot;1.0&quot;</span> encoding<span class="sy0">=</span><span class="st0">&quot;UTF-8&quot;</span><span class="sy1">?&gt;</span></div></li><li class="li1"><div class="de1">&lt;modification&gt;</div></li><li class="li1"><div class="de1">        &lt;id&gt;Do NOT require phone-number as required input&lt;/id&gt;</div></li><li class="li1"><div class="de1">        &lt;version&gt;1.0.0&lt;/version&gt;</div></li><li class="li1"><div class="de1">        &lt;vqmver&gt;1.0.9&lt;/vqmver&gt;</div></li><li class="li1"><div class="de1">        &lt;author&gt;hjgode&lt;/author&gt;</div></li><li class="li1"><div class="de1">		&lt;!-- changes for opencart 1.5.1.3 --&gt;</div></li><li class="li1"><div class="de1">        &lt;file name=&quot;catalog/view/theme/*/template/account/register.tpl&quot;&gt;</div></li><li class="li1"><div class="de1">                &lt;operation&gt;</div></li><li class="li1"><div class="de1">                    &lt;search position=&quot;replace&quot;&gt;</div></li><li class="li1"><div class="de1">                         &lt;![CDATA[&lt;td&gt;&lt;span class=&quot;required&quot;&gt;*&lt;/span&gt; <span class="kw2">&lt;?php</span> <span class="kw1">echo</span> <span class="re0">$entry_telephone</span><span class="sy0">;</span> <span class="sy1">?&gt;</span>&lt;/td&gt;]]&gt;</div></li><li class="li1"><div class="de1">                    &lt;/search&gt;</div></li><li class="li1"><div class="de1">                    &lt;add&gt;</div></li><li class="li1"><div class="de1">                          &lt;![CDATA[&lt;td&gt;<span class="kw2">&lt;?php</span> <span class="kw1">echo</span> <span class="re0">$entry_telephone</span><span class="sy0">;</span> <span class="sy1">?&gt;</span>&lt;/td&gt;]]&gt;</div></li><li class="li1"><div class="de1">                    &lt;/add&gt;</div></li><li class="li1"><div class="de1">                &lt;/operation&gt;</div></li><li class="li1"><div class="de1">        &lt;/file&gt;</div></li><li class="li1"><div class="de1">&nbsp;</div></li><li class="li1"><div class="de1">        &lt;file name=&quot;catalog/controller/account/register.php&quot;&gt;</div></li><li class="li1"><div class="de1">                &lt;operation&gt;</div></li><li class="li1"><div class="de1">                    &lt;search position=&quot;replace&quot;&gt;</div></li><li class="li1"><div class="de1">                         &lt;![CDATA[if ((utf8_strlen($this-&gt;request-&gt;post['telephone']) &lt; 3) || (utf8_strlen($this-&gt;request-&gt;post['telephone']) &gt; 32)) {]]&gt;</div></li><li class="li1"><div class="de1">                    &lt;/search&gt;</div></li><li class="li1"><div class="de1">                    &lt;add&gt;</div></li><li class="li1"><div class="de1">                          &lt;![CDATA[if ((utf8_strlen($this-&gt;request-&gt;post['telephone']) &lt; 0) || (utf8_strlen($this-&gt;request-&gt;post['telephone']) &gt; 32)) {]]&gt;</div></li><li class="li1"><div class="de1">                    &lt;/add&gt;</div></li><li class="li1"><div class="de1">                &lt;/operation&gt;</div></li><li class="li1"><div class="de1">        &lt;/file&gt;</div></li><li class="li1"><div class="de1">&lt;/modification&gt;</div></li></ol></pre></div></div>
<p>Have Fun</p>
<p>Josef</p>
<!-- Social Bookmarks BEGIN -->
<div class="social_bookmark">
<a><strong><em>Bookmark It</em></strong></a>
<br />
<div class="d">
<br />
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://del.icio.us/post?url=http%3A%2F%2Fwww.hjgode.de%2Fwp%2F2011%2F12%2F15%2Fopencart-vqmod-telefonnummer-bei-registrierung-nicht-erforderlich%2F&amp;title=Opencart+vqmod+%26%238211%3B+Telefonnummer+bei+Registrierung+nicht+erforderlich" rel="nofollow" title="Add to&nbsp;Del.icio.us"><img class="social_img" src="http://www.hjgode.de/wp/wp-content/plugins/social-bookmarks0/images/delicious.png" title="Add to&nbsp;Del.icio.us" alt="Add to&nbsp;Del.icio.us" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.hjgode.de%2Fwp%2F2011%2F12%2F15%2Fopencart-vqmod-telefonnummer-bei-registrierung-nicht-erforderlich%2F&amp;title=Opencart+vqmod+%26%238211%3B+Telefonnummer+bei+Registrierung+nicht+erforderlich" rel="nofollow" title="Add to&nbsp;digg"><img class="social_img" src="http://www.hjgode.de/wp/wp-content/plugins/social-bookmarks0/images/digg.png" title="Add to&nbsp;digg" alt="Add to&nbsp;digg" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.google.com/bookmarks/mark?op=edit&amp;output=popup&amp;bkmk=http%3A%2F%2Fwww.hjgode.de%2Fwp%2F2011%2F12%2F15%2Fopencart-vqmod-telefonnummer-bei-registrierung-nicht-erforderlich%2F&amp;title=Opencart+vqmod+%26%238211%3B+Telefonnummer+bei+Registrierung+nicht+erforderlich" rel="nofollow" title="Add to&nbsp;Google Bookmarks"><img class="social_img" src="http://www.hjgode.de/wp/wp-content/plugins/social-bookmarks0/images/google.png" title="Add to&nbsp;Google Bookmarks" alt="Add to&nbsp;Google Bookmarks" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.netscape.com/submit/?U=http%3A%2F%2Fwww.hjgode.de%2Fwp%2F2011%2F12%2F15%2Fopencart-vqmod-telefonnummer-bei-registrierung-nicht-erforderlich%2F&amp;T=Opencart+vqmod+%26%238211%3B+Telefonnummer+bei+Registrierung+nicht+erforderlich" rel="nofollow" title="Add to&nbsp;Netscape"><img class="social_img" src="http://www.hjgode.de/wp/wp-content/plugins/social-bookmarks0/images/netscape.png" title="Add to&nbsp;Netscape" alt="Add to&nbsp;Netscape" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.technorati.com/faves?add=http%3A%2F%2Fwww.hjgode.de%2Fwp%2F2011%2F12%2F15%2Fopencart-vqmod-telefonnummer-bei-registrierung-nicht-erforderlich%2F" rel="nofollow" title="Add to&nbsp;Technorati"><img class="social_img" src="http://www.hjgode.de/wp/wp-content/plugins/social-bookmarks0/images/technorati.png" title="Add to&nbsp;Technorati" alt="Add to&nbsp;Technorati" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://myweb2.search.yahoo.com/myresults/bookmarklet?u=http%3A%2F%2Fwww.hjgode.de%2Fwp%2F2011%2F12%2F15%2Fopencart-vqmod-telefonnummer-bei-registrierung-nicht-erforderlich%2F&amp;t=Opencart+vqmod+%26%238211%3B+Telefonnummer+bei+Registrierung+nicht+erforderlich" rel="nofollow" title="Add to&nbsp;Yahoo My Web"><img class="social_img" src="http://www.hjgode.de/wp/wp-content/plugins/social-bookmarks0/images/yahoo.png" title="Add to&nbsp;Yahoo My Web" alt="Add to&nbsp;Yahoo My Web" /></a>
<br />
</div>
</div>
<!-- Social Bookmarks END -->
]]></content:encoded>
			<wfw:commentRss>http://www.hjgode.de/wp/2011/12/15/opencart-vqmod-telefonnummer-bei-registrierung-nicht-erforderlich/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Opencart oder OCIE, Versions-Verschleierung</title>
		<link>http://www.hjgode.de/wp/2011/12/15/opencart-oder-ocie-versions-verschleierung/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=opencart-oder-ocie-versions-verschleierung</link>
		<comments>http://www.hjgode.de/wp/2011/12/15/opencart-oder-ocie-versions-verschleierung/#comments</comments>
		<pubDate>Thu, 15 Dec 2011 10:46:36 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[abmahnung]]></category>
		<category><![CDATA[OCIE]]></category>
		<category><![CDATA[opencart]]></category>
		<category><![CDATA[osWorX]]></category>

		<guid isPermaLink="false">http://www.hjgode.de/wp/?p=1264</guid>
		<description><![CDATA[Hallo falls jemand VOR der Installtion von OCIE 1.2.5 wissen will, zu was das kompatibel sein soll oder auf welcher OpenCart Version das basiert: OCIE v.1.2.5 Based on OpenCart v.1.4.9.x Ich finde, dass diese Information NICHT ausreichend auf der OsWorx Webseite zu erkennen ist. Wenn das überhaupt irgenwo vor der Installation zu lesen ist. Auf [...]]]></description>
			<content:encoded><![CDATA[<p>Hallo</p>
<p>falls jemand VOR der Installtion von OCIE 1.2.5 wissen will, zu was das kompatibel sein soll oder auf welcher OpenCart Version das basiert:<br />
<strong>OCIE v.1.2.5</strong><br />
<strong> Based on OpenCart v.1.4.9.x</strong></p>
<p><span id="more-1264"></span>Ich finde, dass diese Information NICHT ausreichend auf der OsWorx Webseite zu erkennen ist. Wenn das überhaupt irgenwo vor der Installation zu lesen ist.</p>
<p>Auf jeden Fall kann man eine 1.4.9 Version wohl kaum über eine Opencart 1.5.1.3 kopieren.</p>
<p>Dank an OsWorX für meine verschwendete Zeit.</p>
<p>Übrigens solltet Ihr euch gut überlegen, ob Ihr euch in die Hände eines einzelnen Programmierers begebt, der eure Angst schürt. Da schreibe ich lieber meine eigenen Erweiterungen zu einer, von einer großen Community begleiteten, Opencart Version.</p>
<p>Das Support-Board von OsWorX ist auch die Hölle. Es war mir nicht möglich, mich dort zu registrieren, nachdem es einmal fehlgeschlagen ist, war meine eMail wohl hinterlegt, aber kein Zugriff möglich. Die eMial-Adresse des Board-Admins für eine Rücksetzung des Accounts (oder was auch immer) habe ich nicht finden können. Na ja, ich komme auch ohne das Board aus.</p>
<p>Viele Spaß mit OCIE (besser OpenCart)</p>
<p>Josef</p>
<!-- Social Bookmarks BEGIN -->
<div class="social_bookmark">
<a><strong><em>Bookmark It</em></strong></a>
<br />
<div class="d">
<br />
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://del.icio.us/post?url=http%3A%2F%2Fwww.hjgode.de%2Fwp%2F2011%2F12%2F15%2Fopencart-oder-ocie-versions-verschleierung%2F&amp;title=Opencart+oder+OCIE%2C+Versions-Verschleierung" rel="nofollow" title="Add to&nbsp;Del.icio.us"><img class="social_img" src="http://www.hjgode.de/wp/wp-content/plugins/social-bookmarks0/images/delicious.png" title="Add to&nbsp;Del.icio.us" alt="Add to&nbsp;Del.icio.us" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.hjgode.de%2Fwp%2F2011%2F12%2F15%2Fopencart-oder-ocie-versions-verschleierung%2F&amp;title=Opencart+oder+OCIE%2C+Versions-Verschleierung" rel="nofollow" title="Add to&nbsp;digg"><img class="social_img" src="http://www.hjgode.de/wp/wp-content/plugins/social-bookmarks0/images/digg.png" title="Add to&nbsp;digg" alt="Add to&nbsp;digg" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.google.com/bookmarks/mark?op=edit&amp;output=popup&amp;bkmk=http%3A%2F%2Fwww.hjgode.de%2Fwp%2F2011%2F12%2F15%2Fopencart-oder-ocie-versions-verschleierung%2F&amp;title=Opencart+oder+OCIE%2C+Versions-Verschleierung" rel="nofollow" title="Add to&nbsp;Google Bookmarks"><img class="social_img" src="http://www.hjgode.de/wp/wp-content/plugins/social-bookmarks0/images/google.png" title="Add to&nbsp;Google Bookmarks" alt="Add to&nbsp;Google Bookmarks" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.netscape.com/submit/?U=http%3A%2F%2Fwww.hjgode.de%2Fwp%2F2011%2F12%2F15%2Fopencart-oder-ocie-versions-verschleierung%2F&amp;T=Opencart+oder+OCIE%2C+Versions-Verschleierung" rel="nofollow" title="Add to&nbsp;Netscape"><img class="social_img" src="http://www.hjgode.de/wp/wp-content/plugins/social-bookmarks0/images/netscape.png" title="Add to&nbsp;Netscape" alt="Add to&nbsp;Netscape" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.technorati.com/faves?add=http%3A%2F%2Fwww.hjgode.de%2Fwp%2F2011%2F12%2F15%2Fopencart-oder-ocie-versions-verschleierung%2F" rel="nofollow" title="Add to&nbsp;Technorati"><img class="social_img" src="http://www.hjgode.de/wp/wp-content/plugins/social-bookmarks0/images/technorati.png" title="Add to&nbsp;Technorati" alt="Add to&nbsp;Technorati" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://myweb2.search.yahoo.com/myresults/bookmarklet?u=http%3A%2F%2Fwww.hjgode.de%2Fwp%2F2011%2F12%2F15%2Fopencart-oder-ocie-versions-verschleierung%2F&amp;t=Opencart+oder+OCIE%2C+Versions-Verschleierung" rel="nofollow" title="Add to&nbsp;Yahoo My Web"><img class="social_img" src="http://www.hjgode.de/wp/wp-content/plugins/social-bookmarks0/images/yahoo.png" title="Add to&nbsp;Yahoo My Web" alt="Add to&nbsp;Yahoo My Web" /></a>
<br />
</div>
</div>
<!-- Social Bookmarks END -->
]]></content:encoded>
			<wfw:commentRss>http://www.hjgode.de/wp/2011/12/15/opencart-oder-ocie-versions-verschleierung/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Develop an OpenCart vqmod to alter the confirm eMail</title>
		<link>http://www.hjgode.de/wp/2011/12/13/develop-an-opencart-vqmod-to-alter-the-confirm-email/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=develop-an-opencart-vqmod-to-alter-the-confirm-email</link>
		<comments>http://www.hjgode.de/wp/2011/12/13/develop-an-opencart-vqmod-to-alter-the-confirm-email/#comments</comments>
		<pubDate>Tue, 13 Dec 2011 05:21:17 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[CodeProject]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[OpenCart]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[abmahnung]]></category>
		<category><![CDATA[impressum]]></category>
		<category><![CDATA[netbeans]]></category>
		<category><![CDATA[opencart]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[vqmod]]></category>
		<category><![CDATA[wiederrufsbelehrung]]></category>

		<guid isPermaLink="false">http://www.hjgode.de/wp/?p=1249</guid>
		<description><![CDATA[Hello [updated 21. dec 2011, see code change] I had the need to alter the OpenCart (1.5.1.3) order confirmation eMail to include some legal text (german Impressum (company contact) and Wiederrufsbelehrung, Stichwort Abmahnung) and to remove the display of the IP. To be able to watch and debug my code additions, I had to setup [...]]]></description>
			<content:encoded><![CDATA[<p>Hello</p>
<p>[updated 21. dec 2011, see code change]</p>
<p>I had the need to alter the OpenCart (1.5.1.3) order confirmation eMail to include some legal text (german Impressum (company contact) and Wiederrufsbelehrung, Stichwort Abmahnung) and to remove the display of the IP.</p>
<p>To be able to watch and debug my code additions, I had to setup a development system for the OpenCart shop instance:</p>
<p><strong><span id="more-1249"></span>Development system Windows 7 (x64)<br />
opencart 1.5.1.3 + german language extension and vqmod</strong></p>
<ul>
<li>Installed xampp17</li>
<li>copied online opencart dir to xampp/htdocs/opencart</li>
<li>edited opencart/config.php and opencart/admin/config.php</li>
<li>did a mysql export of the online database (phpMyAdmin)</li>
<li>imported mysql backup to development xampp mysql</li>
<li>installed netbeans</li>
<li>installed xdebug (xampp/php/php.ini changes and xampp/php/ext/xdebug_php)</li>
<li>removed opencart/vqmod xml files that alter the opencart URLs</li>
<li><del>installed smtp4dev by copying the exe to xampp/smtp4dev </del></li>
<li><del>started smtp4dev</del></li>
</ul>
<p>changed to papercut as smtp4dev is not UTF-8 compatible</p>
<ul>
<li>downloaded and installed papercut (http://papercut.codeplex.com/releases/view/41337)</li>
<li>started papercut</li>
<li>start xampp apache and mysql</li>
<li>check if localhost ports (80, 25, 9000) are in use (tcpmon by sysinternals), possibly kill or disable processes or change port for xdebug</li>
<li>check if browser can load http://localhost/opencart</li>
<li>start netbeans, create new project and import existing php code</li>
<li>check, if you can debug: start a debug of the netbeans php project, debugger will stop at first line</li>
<li>change netbeans setting PHP-debug stop at first line</li>
<li>place a break point in confirm function of opencart\catalog\model\checkout\order.php</li>
<li>test if debugger breaks when you place an order and press (Confirm Order)</li>
<li>possibly disable opencart SEO friendly URL setting</li>
<li>if URLs are changed (ie using vqmod beop_all_clean_urls_v1.0.4.xml), netbeans will have problems following the code (breakpoints will never been hit)<br />
+ready to debug+</li>
<li>Enable Charge-on-delivery payment option, testing with a paypal payment in plcae does not make sense</li>
</ul>
<p>The Confirm eMail will be generated by the confirm function inside<br />
catalog/model/checkout/order.php</p>
<p>The file<br />
catalog/language/_xy_/checkout/checkout.php<br />
has the fixed texts for the confirm eMail</p>
<p>catalog\view\_xy_\default\template\checkout\checkout.tpl</p>
<p>In order.php you can see the construction of the the main html order confirmation email template variables and also those for the plain text version. The final template can then be found in catalog/view/theme/default/mail/order_confirm.tpl.</p>
<p>First I did a direct change of order.php for testing<br />
As everything works as desired, I moved the added lines into a vqmod file which I already had ready for IP replacing.<br />
I will use two external files which hold the fixed text for the legal information:</p>
<p>opencart\catalog\view\theme\wiederruf_bottom.html<br />
opencart\catalog\view\theme\wiederruf_top.html</p>
<p>Here is my direct test code addition inside opencart\catalog\model\checkout\order.php just before<br />
if ($comment &amp;&amp; $notify) {<br />
in the confirm function:</p>
<pre lang="PHP"></pre>
<div id="wpshdo_13" class="wp-synhighlighter-outer"><div id="wpshdt_13" class="wp-synhighlighter-expanded"><table border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_13"></a><a id="wpshat_13" class="wp-synhighlighter-title" href="#codesyntax_13"  onClick="javascript:wpsh_toggleBlock(13)" title="Click to show/hide code block">Source code</a></td><td align="right"><a href="#codesyntax_13" onClick="javascript:wpsh_code(13)" title="Show code only"><img border="0" style="border: 0 none" src="http://www.hjgode.de/wp/wp-content/plugins/wp-synhighlight/themes/default/images/code.png" /></a>&nbsp;<a href="#codesyntax_13" onClick="javascript:wpsh_print(13)" title="Print code"><img border="0" style="border: 0 none" src="http://www.hjgode.de/wp/wp-content/plugins/wp-synhighlight/themes/default/images/printer.png" /></a>&nbsp;<a href="http://www.hjgode.de/wp/wp-content/plugins/wp-synhighlight/About.html" target="_blank" title="Show plugin information"><img border="0" style="border: 0 none" src="http://www.hjgode.de/wp/wp-content/plugins/wp-synhighlight/themes/default/images/info.gif" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_13" class="wp-synhighlighter-inner" style="display: block;"><pre class="php" style="font-family:monospace;"><ol><li class="li1"><div class="de1"><span class="co1">//replace footer text by impressum if german session</span></div></li><li class="li1"><div class="de1"><span class="kw1">if</span><span class="br0">&#40;</span><span class="re0">$this</span><span class="sy0">-&gt;</span><span class="me1">session</span><span class="sy0">-&gt;</span><span class="me1">data</span><span class="br0">&#91;</span><span class="st_h">'language'</span><span class="br0">&#93;</span> <span class="sy0">==</span> <span class="st_h">'de'</span><span class="br0">&#41;</span><span class="br0">&#123;</span> <span class="co1">//$language-&gt;data[code]==&quot;de&quot;</span></div></li><li class="li1"><div class="de1">	<span class="co1">// files in opencart/catalog/view/theme/'</span></div></li><li class="li1"><div class="de1">	<span class="co1">//read top html part of wiederrufsbelehrung</span></div></li><li class="li1"><div class="de1">	<span class="re0">$wiederruf_top</span><span class="sy0">=</span><span class="st0">&quot;&quot;</span><span class="sy0">;</span></div></li><li class="li1"><div class="de1">	<span class="re0">$wiederruf_top</span> <span class="sy0">=</span> <a href="http://www.php.net/file_get_contents"><span class="kw3">file_get_contents</span></a><span class="br0">&#40;</span><span class="re0">$filename</span><span class="sy0">=</span> DIR_TEMPLATE <span class="sy0">.</span> <span class="st_h">'wiederruf_top.html'</span><span class="br0">&#41;</span><span class="sy0">;</span></div></li><li class="li1"><div class="de1">	<span class="co1">//read bottom html part of wiederrufsbelehrung</span></div></li><li class="li1"><div class="de1">	<span class="re0">$wiederruf_bottom</span><span class="sy0">=</span><span class="st0">&quot;&quot;</span><span class="sy0">;</span></div></li><li class="li1"><div class="de1">	<span class="re0">$wiederruf_bottom</span> <span class="sy0">=</span> <a href="http://www.php.net/file_get_contents"><span class="kw3">file_get_contents</span></a><span class="br0">&#40;</span>DIR_TEMPLATE <span class="sy0">.</span> <span class="st_h">'wiederruf_bottom.html'</span><span class="br0">&#41;</span><span class="sy0">;</span></div></li><li class="li1"><div class="de1">	<span class="co1">//build the company address</span></div></li><li class="li1"><div class="de1">	<span class="re0">$firmen_addresse</span> <span class="sy0">=</span></div></li><li class="li1"><div class="de1">	    <span class="re0">$this</span><span class="sy0">-&gt;</span><span class="me1">config</span><span class="sy0">-&gt;</span><span class="me1">get</span><span class="br0">&#40;</span><span class="st_h">'config_name'</span><span class="br0">&#41;</span> <span class="sy0">.</span> <span class="st_h">'&lt;br&gt;'</span> <span class="sy0">.</span></div></li><li class="li1"><div class="de1">	    <span class="re0">$this</span><span class="sy0">-&gt;</span><span class="me1">config</span><span class="sy0">-&gt;</span><span class="me1">get</span><span class="br0">&#40;</span><span class="st_h">'config_owner'</span><span class="br0">&#41;</span> <span class="sy0">.</span> <span class="st_h">'&lt;br&gt;'</span> <span class="sy0">.</span></div></li><li class="li1"><div class="de1">	    <a href="http://www.php.net/str_replace"><span class="kw3">str_replace</span></a><span class="br0">&#40;</span><a href="http://www.php.net/array"><span class="kw3">array</span></a><span class="br0">&#40;</span><span class="st0">&quot;<span class="es1">\r</span><span class="es1">\n</span>&quot;</span><span class="sy0">,</span> <span class="st0">&quot;<span class="es1">\r</span>&quot;</span><span class="sy0">,</span> <span class="st0">&quot;<span class="es1">\n</span>&quot;</span><span class="br0">&#41;</span><span class="sy0">,</span> <span class="st_h">'&lt;br /&gt;'</span><span class="sy0">,</span> <span class="re0">$this</span><span class="sy0">-&gt;</span><span class="me1">config</span><span class="sy0">-&gt;</span><span class="me1">get</span><span class="br0">&#40;</span><span class="st_h">'config_address'</span><span class="br0">&#41;</span><span class="br0">&#41;</span> <span class="sy0">.</span> <span class="st_h">'&lt;br&gt;'</span> <span class="sy0">.</span></div></li><li class="li1"><div class="de1">	    <span class="re0">$this</span><span class="sy0">-&gt;</span><span class="me1">config</span><span class="sy0">-&gt;</span><span class="me1">get</span><span class="br0">&#40;</span><span class="st_h">'config_email'</span><span class="br0">&#41;</span> <span class="sy0">.</span> <span class="st_h">'&lt;br&gt;'</span> <span class="sy0">.</span></div></li><li class="li1"><div class="de1">	    <span class="re0">$this</span><span class="sy0">-&gt;</span><span class="me1">config</span><span class="sy0">-&gt;</span><span class="me1">get</span><span class="br0">&#40;</span><span class="st_h">'config_telephone'</span><span class="br0">&#41;</span> <span class="sy0">.</span> <span class="st_h">'&lt;br&gt;'</span> <span class="sy0">.</span></div></li><li class="li1"><div class="de1">	    <span class="re0">$this</span><span class="sy0">-&gt;</span><span class="me1">config</span><span class="sy0">-&gt;</span><span class="me1">get</span><span class="br0">&#40;</span><span class="st_h">'config_fax'</span><span class="br0">&#41;</span> <span class="sy0">.</span> <span class="st_h">'&lt;br&gt;'</span><span class="sy0">;</span></div></li><li class="li1"><div class="de1">	<span class="co1">//combile top part, company address and bottom part in a new string</span></div></li><li class="li1"><div class="de1">	<span class="re0">$wiederruf</span> <span class="sy0">=</span> <span class="re0">$wiederruf_top</span> <span class="sy0">.</span> <span class="re0">$firmen_addresse</span> <span class="sy0">.</span> <span class="re0">$wiederruf_bottom</span><span class="sy0">;</span></div></li><li class="li1"><div class="de1">	<span class="co1">//build the impressum (company address and contact info)</span></div></li><li class="li1"><div class="de1">	<span class="re0">$impressum</span> <span class="sy0">=</span> <span class="st_h">'Impressum:&lt;br&gt;'</span> <span class="sy0">.</span> <span class="re0">$firmen_addresse</span><span class="sy0">;</span></div></li><li class="li1"><div class="de1">	<span class="re0">$this</span><span class="sy0">-&gt;</span><span class="me1">config</span><span class="sy0">-&gt;</span><span class="me1">get</span><span class="br0">&#40;</span><span class="st_h">'config_name'</span><span class="br0">&#41;</span> <span class="sy0">.</span> <span class="st_h">'&lt;br&gt;'</span> <span class="sy0">.</span></div></li><li class="li1"><div class="de1">	<span class="re0">$this</span><span class="sy0">-&gt;</span><span class="me1">config</span><span class="sy0">-&gt;</span><span class="me1">get</span><span class="br0">&#40;</span><span class="st_h">'config_owner'</span><span class="br0">&#41;</span> <span class="sy0">.</span> <span class="st_h">'&lt;br&gt;'</span> <span class="sy0">.</span></div></li><li class="li1"><div class="de1">	<a href="http://www.php.net/str_replace"><span class="kw3">str_replace</span></a><span class="br0">&#40;</span><a href="http://www.php.net/array"><span class="kw3">array</span></a><span class="br0">&#40;</span><span class="st0">&quot;<span class="es1">\r</span><span class="es1">\n</span>&quot;</span><span class="sy0">,</span> <span class="st0">&quot;<span class="es1">\r</span>&quot;</span><span class="sy0">,</span> <span class="st0">&quot;<span class="es1">\n</span>&quot;</span><span class="br0">&#41;</span><span class="sy0">,</span> <span class="st_h">'&lt;br /&gt;'</span><span class="sy0">,</span> <span class="re0">$this</span><span class="sy0">-&gt;</span><span class="me1">config</span><span class="sy0">-&gt;</span><span class="me1">get</span><span class="br0">&#40;</span><span class="st_h">'config_address'</span><span class="br0">&#41;</span><span class="br0">&#41;</span> <span class="sy0">.</span> <span class="st_h">'&lt;br&gt;'</span> <span class="sy0">.</span></div></li><li class="li1"><div class="de1">	<span class="re0">$this</span><span class="sy0">-&gt;</span><span class="me1">config</span><span class="sy0">-&gt;</span><span class="me1">get</span><span class="br0">&#40;</span><span class="st_h">'config_email'</span><span class="br0">&#41;</span> <span class="sy0">.</span> <span class="st_h">'&lt;br&gt;'</span> <span class="sy0">.</span></div></li><li class="li1"><div class="de1">	<span class="re0">$this</span><span class="sy0">-&gt;</span><span class="me1">config</span><span class="sy0">-&gt;</span><span class="me1">get</span><span class="br0">&#40;</span><span class="st_h">'config_telephone'</span><span class="br0">&#41;</span> <span class="sy0">.</span> <span class="st_h">'&lt;br&gt;'</span> <span class="sy0">.</span></div></li><li class="li1"><div class="de1">	<span class="re0">$this</span><span class="sy0">-&gt;</span><span class="me1">config</span><span class="sy0">-&gt;</span><span class="me1">get</span><span class="br0">&#40;</span><span class="st_h">'config_fax'</span><span class="br0">&#41;</span> <span class="sy0">.</span> <span class="st_h">'&lt;br&gt;'</span><span class="sy0">;</span></div></li><li class="li1"><div class="de1">	<span class="co1">//$this-&gt;config-&gt;get('config_title') . '&lt;br&gt;';</span></div></li><li class="li1"><div class="de1">	<span class="co1">//replace footer in confirm eMail by our impressum and wiederrufsbelehrung</span></div></li><li class="li1"><div class="de1">	<span class="re0">$template</span><span class="sy0">-&gt;</span><span class="me1">data</span><span class="br0">&#91;</span><span class="st_h">'text_footer'</span><span class="br0">&#93;</span> <span class="sy0">=</span> <span class="re0">$impressum</span> <span class="sy0">.</span> <span class="re0">$wiederruf</span><span class="sy0">;</span></div></li><li class="li1"><div class="de1"><span class="br0">&#125;</span></div></li></ol></pre></div></div>
<p>For hiding the IP address in the order confirmation eMail I had to change several lines, please see the full vqmod file:</p>
<div id="wpshdo_14" class="wp-synhighlighter-outer"><div id="wpshdt_14" class="wp-synhighlighter-expanded"><table border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_14"></a><a id="wpshat_14" class="wp-synhighlighter-title" href="#codesyntax_14"  onClick="javascript:wpsh_toggleBlock(14)" title="Click to show/hide code block">Source code</a></td><td align="right"><a href="#codesyntax_14" onClick="javascript:wpsh_code(14)" title="Show code only"><img border="0" style="border: 0 none" src="http://www.hjgode.de/wp/wp-content/plugins/wp-synhighlight/themes/default/images/code.png" /></a>&nbsp;<a href="#codesyntax_14" onClick="javascript:wpsh_print(14)" title="Print code"><img border="0" style="border: 0 none" src="http://www.hjgode.de/wp/wp-content/plugins/wp-synhighlight/themes/default/images/printer.png" /></a>&nbsp;<a href="http://www.hjgode.de/wp/wp-content/plugins/wp-synhighlight/About.html" target="_blank" title="Show plugin information"><img border="0" style="border: 0 none" src="http://www.hjgode.de/wp/wp-content/plugins/wp-synhighlight/themes/default/images/info.gif" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_14" class="wp-synhighlighter-inner" style="display: block;"><pre class="php" style="font-family:monospace;"><ol><li class="li1"><div class="de1"><span class="sy1">&lt;?</span>xml version<span class="sy0">=</span><span class="st0">&quot;1.0&quot;</span> encoding<span class="sy0">=</span><span class="st0">&quot;UTF-8&quot;</span><span class="sy1">?&gt;</span></div></li><li class="li1"><div class="de1">&lt;modification&gt;</div></li><li class="li1"><div class="de1">        &lt;id&gt;Replace IP and footer text in confirm eMail&lt;/id&gt;</div></li><li class="li1"><div class="de1">        &lt;version&gt;1.0.1&lt;/version&gt;</div></li><li class="li1"><div class="de1">        &lt;vqmver&gt;1.0.9&lt;/vqmver&gt;</div></li><li class="li1"><div class="de1">        &lt;author&gt;hjgode&lt;/author&gt;</div></li><li class="li1"><div class="de1">        &lt;!--</div></li><li class="li1"><div class="de1">        &lt;file name=&quot;catalog/view/theme/*/template/mail/order.tpl&quot;&gt;</div></li><li class="li1"><div class="de1">                &lt;operation&gt;</div></li><li class="li1"><div class="de1">                    &lt;search position=&quot;replace&quot;&gt;</div></li><li class="li1"><div class="de1">                         &lt;![CDATA[&lt;b&gt;<span class="kw2">&lt;?php</span> <span class="kw1">echo</span> <span class="re0">$text_ip</span><span class="sy0">;</span> <span class="sy1">?&gt;</span>&lt;/b&gt; <span class="kw2">&lt;?php</span> <span class="kw1">echo</span> <span class="re0">$ip</span><span class="sy0">;</span> <span class="sy1">?&gt;</span>&lt;br /&gt;]]&gt;</div></li><li class="li1"><div class="de1">                    &lt;/search&gt;</div></li><li class="li1"><div class="de1">                &lt;/operation&gt;</div></li><li class="li1"><div class="de1">                &lt;operation&gt;</div></li><li class="li1"><div class="de1">                    &lt;add&gt;</div></li><li class="li1"><div class="de1">                          &lt;![CDATA[<span class="kw2">&lt;?php</span> <span class="kw1">echo</span> <span class="st_h">'-'</span><span class="sy0">;</span> <span class="sy1">?&gt;</span>&lt;br /&gt;]]&gt;</div></li><li class="li1"><div class="de1">                    &lt;/add&gt;</div></li><li class="li1"><div class="de1">                &lt;/operation&gt;</div></li><li class="li1"><div class="de1">        &lt;/file&gt;</div></li><li class="li1"><div class="de1">        --&gt;</div></li><li class="li1"><div class="de1">        &lt;file name=&quot;catalog/model/checkout/order.php&quot;&gt;</div></li><li class="li1"><div class="de1">                 &lt;operation&gt;</div></li><li class="li1"><div class="de1">                    &lt;search position=&quot;replace&quot;&gt;</div></li><li class="li1"><div class="de1">                        &lt;![CDATA[$template-&gt;data['text_ip'] = $language-&gt;get('text_new_ip');]]&gt;</div></li><li class="li1"><div class="de1">                    &lt;/search&gt;</div></li><li class="li1"><div class="de1">                    &lt;add&gt;</div></li><li class="li1"><div class="de1">                        &lt;![CDATA[$template-&gt;data['text_ip'] ='';</div></li><li class="li1"><div class="de1">                        ]]&gt;</div></li><li class="li1"><div class="de1">                    &lt;/add&gt;</div></li><li class="li1"><div class="de1">                &lt;/operation&gt;</div></li><li class="li1"><div class="de1">                &lt;operation&gt;</div></li><li class="li1"><div class="de1">                    &lt;search position=&quot;replace&quot;&gt;</div></li><li class="li1"><div class="de1">                        &lt;![CDATA[$template-&gt;data['ip'] = $order_info['ip'];]]&gt;</div></li><li class="li1"><div class="de1">                    &lt;/search&gt;</div></li><li class="li1"><div class="de1">                    &lt;add&gt;</div></li><li class="li1"><div class="de1">                        &lt;![CDATA[$template-&gt;data['ip'] = '';</div></li><li class="li1"><div class="de1">                        ]]&gt;</div></li><li class="li1"><div class="de1">                    &lt;/add&gt;</div></li><li class="li1"><div class="de1">                &lt;/operation&gt;</div></li><li class="li1"><div class="de1">                &lt;operation&gt;</div></li><li class="li1"><div class="de1">                    &lt;search position=&quot;before&quot;&gt;</div></li><li class="li1"><div class="de1">                         &lt;![CDATA[if ($comment &amp;&amp; $notify) {]]&gt;</div></li><li class="li1"><div class="de1">                    &lt;/search&gt;</div></li><li class="li1"><div class="de1">                    &lt;add&gt;</div></li><li class="li1"><div class="de1">                          &lt;![CDATA[        </div></li><li class="li1"><div class="de1">                    //replace footer text by impressum if german session</div></li><li class="li1"><div class="de1">                    if($this-&gt;session-&gt;data['language'] == 'de'){ //$language-&gt;data[code]==&quot;de&quot;</div></li><li class="li1"><div class="de1">                        // files in opencart/catalog/view/theme/'</div></li><li class="li1"><div class="de1">                        //read top html part of wiederrufsbelehrung</div></li><li class="li1"><div class="de1">                        $wiederruf_top=&quot;&quot;;  </div></li><li class="li1"><div class="de1">                        $wiederruf_top = file_get_contents($filename= DIR_TEMPLATE . 'wiederruf_top.html');</div></li><li class="li1"><div class="de1">                        //read bottom html part of wiederrufsbelehrung</div></li><li class="li1"><div class="de1">                        $wiederruf_bottom=&quot;&quot;;  </div></li><li class="li1"><div class="de1">                        $wiederruf_bottom = file_get_contents(DIR_TEMPLATE . 'wiederruf_bottom.html');</div></li><li class="li1"><div class="de1">                        //build the company address</div></li><li class="li1"><div class="de1">                        $firmen_addresse =  </div></li><li class="li1"><div class="de1">                            $this-&gt;config-&gt;get('config_name') . '&lt;br&gt;' .</div></li><li class="li1"><div class="de1">                            $this-&gt;config-&gt;get('config_owner') . '&lt;br&gt;' .</div></li><li class="li1"><div class="de1">                            str_replace(array(&quot;\r\n&quot;, &quot;\r&quot;, &quot;\n&quot;), '&lt;br /&gt;', $this-&gt;config-&gt;get('config_address')) . '&lt;br&gt;' .</div></li><li class="li1"><div class="de1">                            $this-&gt;config-&gt;get('config_email') . '&lt;br&gt;' .</div></li><li class="li1"><div class="de1">                            $this-&gt;config-&gt;get('config_telephone') . '&lt;br&gt;' .</div></li><li class="li1"><div class="de1">                            $this-&gt;config-&gt;get('config_fax') . '&lt;br&gt;';</div></li><li class="li1"><div class="de1">                        //combile top part, company address and bottom part in a new string</div></li><li class="li1"><div class="de1">                        $wiederruf = $wiederruf_top . $firmen_addresse . $wiederruf_bottom;</div></li><li class="li1"><div class="de1">                        //build the impressum (company address and contact info)</div></li><li class="li1"><div class="de1">                        $impressum = 'Impressum:&lt;br&gt;' . $firmen_addresse;</div></li><li class="li1"><div class="de1">                        $this-&gt;config-&gt;get('config_name') . '&lt;br&gt;' .</div></li><li class="li1"><div class="de1">                        $this-&gt;config-&gt;get('config_owner') . '&lt;br&gt;' .</div></li><li class="li1"><div class="de1">                        str_replace(array(&quot;\r\n&quot;, &quot;\r&quot;, &quot;\n&quot;), '&lt;br /&gt;', $this-&gt;config-&gt;get('config_address')) . '&lt;br&gt;' .</div></li><li class="li1"><div class="de1">                        $this-&gt;config-&gt;get('config_email') . '&lt;br&gt;' .</div></li><li class="li1"><div class="de1">                        $this-&gt;config-&gt;get('config_telephone') . '&lt;br&gt;' .</div></li><li class="li1"><div class="de1">                        $this-&gt;config-&gt;get('config_fax') . '&lt;br&gt;';</div></li><li class="li1"><div class="de1">                        //$this-&gt;config-&gt;get('config_title') . '&lt;br&gt;';</div></li><li class="li1"><div class="de1">                        //replace footer in confirm eMail by our impressum and wiederrufsbelehrung</div></li><li class="li1"><div class="de1">                        $template-&gt;data['text_footer'] = $impressum . $wiederruf;</div></li><li class="li1"><div class="de1">                    }]]&gt;</div></li><li class="li1"><div class="de1">                    &lt;/add&gt;</div></li><li class="li1"><div class="de1">                &lt;/operation&gt;</div></li><li class="li1"><div class="de1">         &lt;/file&gt;</div></li><li class="li1"><div class="de1">&lt;/modification&gt;</div></li></ol></pre></div></div>
<pre></pre>
<pre></pre>
<p>For this vqmod you need the two htm files wiederruf_bottom.html and wiederruf_top.html in place.</p>
<p>The legal address is read from the opencart store settings using $this-&gt;config-&gt;get('foo'). The names for foo are found in the opencart database itself inside the setting table. The address is then merged in between the top and bottom legal text. The top and bottom legal text files are just html files.</p>
<b>DOWNLOAD:</b><a href="http://www.hjgode.de/wp/wp-content/plugins/download-monitor/download.php?id=147" title="Downloaded 21 times">vqmod file and top and bottom html</a> - vqmod file set um Abmahnungen wegen fehlendem Impressum, fehlender Wiederrufsbelehrung und Anzeige der IP-Adresse zu vermeiden. (Hits: 21, size: 4.22 kB)
<p>updated vqmod file: <b>DOWNLOAD:</b><a href="http://www.hjgode.de/wp/wp-content/plugins/download-monitor/download.php?id=148" title="Downloaded 14 times">updated </a> -  (Hits: 14, size: 1.04 kB)</p>
<p>&amp;nbsp;</p>
<p>&nbsp;</p>
<!-- Social Bookmarks BEGIN -->
<div class="social_bookmark">
<a><strong><em>Bookmark It</em></strong></a>
<br />
<div class="d">
<br />
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://del.icio.us/post?url=http%3A%2F%2Fwww.hjgode.de%2Fwp%2F2011%2F12%2F13%2Fdevelop-an-opencart-vqmod-to-alter-the-confirm-email%2F&amp;title=Develop+an+OpenCart+vqmod+to+alter+the+confirm+eMail" rel="nofollow" title="Add to&nbsp;Del.icio.us"><img class="social_img" src="http://www.hjgode.de/wp/wp-content/plugins/social-bookmarks0/images/delicious.png" title="Add to&nbsp;Del.icio.us" alt="Add to&nbsp;Del.icio.us" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.hjgode.de%2Fwp%2F2011%2F12%2F13%2Fdevelop-an-opencart-vqmod-to-alter-the-confirm-email%2F&amp;title=Develop+an+OpenCart+vqmod+to+alter+the+confirm+eMail" rel="nofollow" title="Add to&nbsp;digg"><img class="social_img" src="http://www.hjgode.de/wp/wp-content/plugins/social-bookmarks0/images/digg.png" title="Add to&nbsp;digg" alt="Add to&nbsp;digg" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.google.com/bookmarks/mark?op=edit&amp;output=popup&amp;bkmk=http%3A%2F%2Fwww.hjgode.de%2Fwp%2F2011%2F12%2F13%2Fdevelop-an-opencart-vqmod-to-alter-the-confirm-email%2F&amp;title=Develop+an+OpenCart+vqmod+to+alter+the+confirm+eMail" rel="nofollow" title="Add to&nbsp;Google Bookmarks"><img class="social_img" src="http://www.hjgode.de/wp/wp-content/plugins/social-bookmarks0/images/google.png" title="Add to&nbsp;Google Bookmarks" alt="Add to&nbsp;Google Bookmarks" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.netscape.com/submit/?U=http%3A%2F%2Fwww.hjgode.de%2Fwp%2F2011%2F12%2F13%2Fdevelop-an-opencart-vqmod-to-alter-the-confirm-email%2F&amp;T=Develop+an+OpenCart+vqmod+to+alter+the+confirm+eMail" rel="nofollow" title="Add to&nbsp;Netscape"><img class="social_img" src="http://www.hjgode.de/wp/wp-content/plugins/social-bookmarks0/images/netscape.png" title="Add to&nbsp;Netscape" alt="Add to&nbsp;Netscape" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.technorati.com/faves?add=http%3A%2F%2Fwww.hjgode.de%2Fwp%2F2011%2F12%2F13%2Fdevelop-an-opencart-vqmod-to-alter-the-confirm-email%2F" rel="nofollow" title="Add to&nbsp;Technorati"><img class="social_img" src="http://www.hjgode.de/wp/wp-content/plugins/social-bookmarks0/images/technorati.png" title="Add to&nbsp;Technorati" alt="Add to&nbsp;Technorati" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://myweb2.search.yahoo.com/myresults/bookmarklet?u=http%3A%2F%2Fwww.hjgode.de%2Fwp%2F2011%2F12%2F13%2Fdevelop-an-opencart-vqmod-to-alter-the-confirm-email%2F&amp;t=Develop+an+OpenCart+vqmod+to+alter+the+confirm+eMail" rel="nofollow" title="Add to&nbsp;Yahoo My Web"><img class="social_img" src="http://www.hjgode.de/wp/wp-content/plugins/social-bookmarks0/images/yahoo.png" title="Add to&nbsp;Yahoo My Web" alt="Add to&nbsp;Yahoo My Web" /></a>
<br />
</div>
</div>
<!-- Social Bookmarks END -->
]]></content:encoded>
			<wfw:commentRss>http://www.hjgode.de/wp/2011/12/13/develop-an-opencart-vqmod-to-alter-the-confirm-email/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Automated Login for Remote Desktop Mobile II update III</title>
		<link>http://www.hjgode.de/wp/2011/11/18/automated-login-for-remote-desktop-mobile-ii-update-iii/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=automated-login-for-remote-desktop-mobile-ii-update-iii</link>
		<comments>http://www.hjgode.de/wp/2011/11/18/automated-login-for-remote-desktop-mobile-ii-update-iii/#comments</comments>
		<pubDate>Fri, 18 Nov 2011 06:49:41 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.hjgode.de/wp/?p=1242</guid>
		<description><![CDATA[Hello this is just a note to let you know that &#8220;Automated Login for Remote Desktop Mobile II&#8221; post has been updated. Many thanks to Patrik S. for finding out the bugs. Great to see, that some take the code and use it. Best regards Josef Bookmark It]]></description>
			<content:encoded><![CDATA[<p>Hello</p>
<p>this is just a note to let you know that &#8220;<a title="Automated Login updated" href="http://www.hjgode.de/wp/2010/06/23/automated-login-for-remote-desktop-mobile-ii/">Automated Login for Remote Desktop Mobile II</a>&#8221; post has been updated.</p>
<p>Many thanks to Patrik S. for finding out the bugs. Great to see, that some take the code and use it.</p>
<p>Best regards</p>
<p>Josef</p>
<!-- Social Bookmarks BEGIN -->
<div class="social_bookmark">
<a><strong><em>Bookmark It</em></strong></a>
<br />
<div class="d">
<br />
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://del.icio.us/post?url=http%3A%2F%2Fwww.hjgode.de%2Fwp%2F2011%2F11%2F18%2Fautomated-login-for-remote-desktop-mobile-ii-update-iii%2F&amp;title=Automated+Login+for+Remote+Desktop+Mobile+II+update+III" rel="nofollow" title="Add to&nbsp;Del.icio.us"><img class="social_img" src="http://www.hjgode.de/wp/wp-content/plugins/social-bookmarks0/images/delicious.png" title="Add to&nbsp;Del.icio.us" alt="Add to&nbsp;Del.icio.us" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.hjgode.de%2Fwp%2F2011%2F11%2F18%2Fautomated-login-for-remote-desktop-mobile-ii-update-iii%2F&amp;title=Automated+Login+for+Remote+Desktop+Mobile+II+update+III" rel="nofollow" title="Add to&nbsp;digg"><img class="social_img" src="http://www.hjgode.de/wp/wp-content/plugins/social-bookmarks0/images/digg.png" title="Add to&nbsp;digg" alt="Add to&nbsp;digg" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.google.com/bookmarks/mark?op=edit&amp;output=popup&amp;bkmk=http%3A%2F%2Fwww.hjgode.de%2Fwp%2F2011%2F11%2F18%2Fautomated-login-for-remote-desktop-mobile-ii-update-iii%2F&amp;title=Automated+Login+for+Remote+Desktop+Mobile+II+update+III" rel="nofollow" title="Add to&nbsp;Google Bookmarks"><img class="social_img" src="http://www.hjgode.de/wp/wp-content/plugins/social-bookmarks0/images/google.png" title="Add to&nbsp;Google Bookmarks" alt="Add to&nbsp;Google Bookmarks" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.netscape.com/submit/?U=http%3A%2F%2Fwww.hjgode.de%2Fwp%2F2011%2F11%2F18%2Fautomated-login-for-remote-desktop-mobile-ii-update-iii%2F&amp;T=Automated+Login+for+Remote+Desktop+Mobile+II+update+III" rel="nofollow" title="Add to&nbsp;Netscape"><img class="social_img" src="http://www.hjgode.de/wp/wp-content/plugins/social-bookmarks0/images/netscape.png" title="Add to&nbsp;Netscape" alt="Add to&nbsp;Netscape" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.technorati.com/faves?add=http%3A%2F%2Fwww.hjgode.de%2Fwp%2F2011%2F11%2F18%2Fautomated-login-for-remote-desktop-mobile-ii-update-iii%2F" rel="nofollow" title="Add to&nbsp;Technorati"><img class="social_img" src="http://www.hjgode.de/wp/wp-content/plugins/social-bookmarks0/images/technorati.png" title="Add to&nbsp;Technorati" alt="Add to&nbsp;Technorati" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://myweb2.search.yahoo.com/myresults/bookmarklet?u=http%3A%2F%2Fwww.hjgode.de%2Fwp%2F2011%2F11%2F18%2Fautomated-login-for-remote-desktop-mobile-ii-update-iii%2F&amp;t=Automated+Login+for+Remote+Desktop+Mobile+II+update+III" rel="nofollow" title="Add to&nbsp;Yahoo My Web"><img class="social_img" src="http://www.hjgode.de/wp/wp-content/plugins/social-bookmarks0/images/yahoo.png" title="Add to&nbsp;Yahoo My Web" alt="Add to&nbsp;Yahoo My Web" /></a>
<br />
</div>
</div>
<!-- Social Bookmarks END -->
]]></content:encoded>
			<wfw:commentRss>http://www.hjgode.de/wp/2011/11/18/automated-login-for-remote-desktop-mobile-ii-update-iii/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>KeyWedge: Updated</title>
		<link>http://www.hjgode.de/wp/2011/11/10/keywedge-updated/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=keywedge-updated</link>
		<comments>http://www.hjgode.de/wp/2011/11/10/keywedge-updated/#comments</comments>
		<pubDate>Thu, 10 Nov 2011 14:45:27 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[CodeProject]]></category>
		<category><![CDATA[Int*rm*c]]></category>
		<category><![CDATA[Keyboard]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[keyboard]]></category>
		<category><![CDATA[KeyWedge]]></category>
		<category><![CDATA[wedge]]></category>

		<guid isPermaLink="false">http://www.hjgode.de/wp/?p=1233</guid>
		<description><![CDATA[Hello at KeyWedge I posted my code that connects to a serial port and then simulates keystrokes into your application. Now, there were issues where the reconnect did not automatically take place after a Suspend/Resume and you had to invoke the main window and select File-Hide just to let KeyWedge reconnect. This happens on devices [...]]]></description>
			<content:encoded><![CDATA[<p>Hello</p>
<p>at <a title="KeyWede Post" href="http://www.hjgode.de/wp/2009/10/22/keywedge-a-serial-port-to-keyboard-message-connector/">KeyWedge </a>I posted my code that connects to a serial port and then simulates keystrokes into your application.</p>
<p>Now, there were issues where the reconnect did not automatically take place after a Suspend/Resume and you had to invoke the main window and select File-Hide just to let KeyWedge reconnect. This happens on devices that provide the communication port all the time and dont close it during a suspend.</p>
<p>I have added some code to watch the Windows Mobile Power Message Queue for RESUM messages and then do an automatic reconnect. The other option would have been to send some data thru the port periodically to check if it is still working. But this may disturb the attached the device.</p>
<p>The main change is in PowerMsgQueue.cpp. It implements the msg queue to receive power broadcast messages like done in a MSDN example code. If a resume message is encountered, the code sends a WM_USER message to the main window, which will do a SuspendComm/ResumeComm cycle. Very easy.</p>
<p>In PowerMsgQueue.cpp we have code that recognizes the resume:</p>
<pre lang="cpp">                case PBT_TRANSITION:
                    nclog(L"Power Notification Message: PBT_TRANSITION\n");
                    //Add2Log(L"Power Notification Message: PBT_TRANSITION\n",TRUE);
                    nclog(L"Flags: %lx\n", ppb-&gt;Flags);
                    nclog(L"Length: %d\n", ppb-&gt;Length);
                    wsprintf(szPBtype, L"trans.: ");
/*
Flags: 12010000
Length: 6
trans.: ON|PASSWORD|BACKLIGHTON|
*/
                    if(ppb-&gt;Flags &amp; 0x12010000)
                    {
                        nclog(L"PwrMsgQueue: got 'ON|PASSWORD|BACKLIGHTON'...\n");
                        //send a message to main window
                        iPost = PostMessage(hwndMain, WM_USER_RESUMECOMM, 0, 0);
                        nclog(L"PostMessage WM_USER_RESUMECOMM returned %i\n", iPost);
                    }
                    break; 

                case PBT_RESUME:
                    nclog(L"Power Notification Message: PBT_RESUME\n");
                    //Add2Log(L"Power Notification Message: PBT_RESUME\n",TRUE);
                    wsprintf(szPBtype, L"resume: ");
                    //send a message to main window
                    iPost = PostMessage(hwndMain, WM_USER_RESUMECOMM, 0, 0);
                    nclog(L"PostMessage WM_USER_RESUMECOMM returned %i\n", iPost);
                    nclog(L"Power: PBT_RESUME\n");
                    break;</pre>
<p>To not block the queue, I use PostMessage to inform the main window of the Resume. Here is the simple code block in WndProc of the main window:</p>
<p><span id="more-1233"></span></p>
<pre lang="cpp">        case WM_USER_RESUMECOMM: //will be called from bg thread after suspend/resume
            nclog(L"WndProc: received WM_USER_RESUMECOMM: restarting COMM\n");
            suspendCOMM();
            Sleep(100);
            resumeCOMM(); //suspend is called in MYMSG_TASKBARNOTIFY
            break;</pre>
<p>The msgQueue thread is created in InitInstance of the main window:</p>
<pre lang="cpp">    //create PowerResume watchdog thread
    hwndMain=hWnd;
    if(startMsgThread()==0)
        nclog(L"InitInstance: startMsgThread() OK\r\n");
    else
        nclog(L"InitInstance: startMsgThread() FAILED\r\n");

    //helps
    resumeCOMM();

    ShowWindow(hWnd, SW_HIDE);//nCmdShow);
    UpdateWindow(hWnd);</pre>
<p>Have fun coding</p>
<p>Josef</p>
<p>VS2008 WM6 SDK Project: <b>DOWNLOAD:</b><a href="http://www.hjgode.de/wp/wp-content/plugins/download-monitor/download.php?id=145" title="Downloaded 34 times">KeyWedge 2</a> -  (Hits: 34, size: 682.7 kB)</p>
<!-- Social Bookmarks BEGIN -->
<div class="social_bookmark">
<a><strong><em>Bookmark It</em></strong></a>
<br />
<div class="d">
<br />
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://del.icio.us/post?url=http%3A%2F%2Fwww.hjgode.de%2Fwp%2F2011%2F11%2F10%2Fkeywedge-updated%2F&amp;title=KeyWedge%3A+Updated" rel="nofollow" title="Add to&nbsp;Del.icio.us"><img class="social_img" src="http://www.hjgode.de/wp/wp-content/plugins/social-bookmarks0/images/delicious.png" title="Add to&nbsp;Del.icio.us" alt="Add to&nbsp;Del.icio.us" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.hjgode.de%2Fwp%2F2011%2F11%2F10%2Fkeywedge-updated%2F&amp;title=KeyWedge%3A+Updated" rel="nofollow" title="Add to&nbsp;digg"><img class="social_img" src="http://www.hjgode.de/wp/wp-content/plugins/social-bookmarks0/images/digg.png" title="Add to&nbsp;digg" alt="Add to&nbsp;digg" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.google.com/bookmarks/mark?op=edit&amp;output=popup&amp;bkmk=http%3A%2F%2Fwww.hjgode.de%2Fwp%2F2011%2F11%2F10%2Fkeywedge-updated%2F&amp;title=KeyWedge%3A+Updated" rel="nofollow" title="Add to&nbsp;Google Bookmarks"><img class="social_img" src="http://www.hjgode.de/wp/wp-content/plugins/social-bookmarks0/images/google.png" title="Add to&nbsp;Google Bookmarks" alt="Add to&nbsp;Google Bookmarks" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.netscape.com/submit/?U=http%3A%2F%2Fwww.hjgode.de%2Fwp%2F2011%2F11%2F10%2Fkeywedge-updated%2F&amp;T=KeyWedge%3A+Updated" rel="nofollow" title="Add to&nbsp;Netscape"><img class="social_img" src="http://www.hjgode.de/wp/wp-content/plugins/social-bookmarks0/images/netscape.png" title="Add to&nbsp;Netscape" alt="Add to&nbsp;Netscape" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.technorati.com/faves?add=http%3A%2F%2Fwww.hjgode.de%2Fwp%2F2011%2F11%2F10%2Fkeywedge-updated%2F" rel="nofollow" title="Add to&nbsp;Technorati"><img class="social_img" src="http://www.hjgode.de/wp/wp-content/plugins/social-bookmarks0/images/technorati.png" title="Add to&nbsp;Technorati" alt="Add to&nbsp;Technorati" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://myweb2.search.yahoo.com/myresults/bookmarklet?u=http%3A%2F%2Fwww.hjgode.de%2Fwp%2F2011%2F11%2F10%2Fkeywedge-updated%2F&amp;t=KeyWedge%3A+Updated" rel="nofollow" title="Add to&nbsp;Yahoo My Web"><img class="social_img" src="http://www.hjgode.de/wp/wp-content/plugins/social-bookmarks0/images/yahoo.png" title="Add to&nbsp;Yahoo My Web" alt="Add to&nbsp;Yahoo My Web" /></a>
<br />
</div>
</div>
<!-- Social Bookmarks END -->
]]></content:encoded>
			<wfw:commentRss>http://www.hjgode.de/wp/2011/11/10/keywedge-updated/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>KeyToggleStart: Yet another usage for keyboard hook</title>
		<link>http://www.hjgode.de/wp/2011/09/08/keytogglestart-yet-another-usage-for-keyboard-hook/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=keytogglestart-yet-another-usage-for-keyboard-hook</link>
		<comments>http://www.hjgode.de/wp/2011/09/08/keytogglestart-yet-another-usage-for-keyboard-hook/#comments</comments>
		<pubDate>Thu, 08 Sep 2011 10:56:04 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[CodeProject]]></category>
		<category><![CDATA[Keyboard]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[Utilities]]></category>
		<category><![CDATA[function keys]]></category>
		<category><![CDATA[hook]]></category>
		<category><![CDATA[keyboard]]></category>
		<category><![CDATA[windows mobile]]></category>

		<guid isPermaLink="false">http://www.hjgode.de/wp/?p=1204</guid>
		<description><![CDATA[Hello Windows Mobile Users recently the following was requested: How can I start an application by just hitting some keys in sequence? The answer: Just use a keyboard hook. So I started to code this hook tool based on my KeyToggleBoot2 code. There was not too much to change. The new tool is called KeyToggleStart [...]]]></description>
			<content:encoded><![CDATA[<p>Hello Windows Mobile Users</p>
<p>recently the following was requested:</p>
<p>How can I start an application by just hitting some keys in sequence?</p>
<p>The answer: Just use a keyboard hook.</p>
<p>So I started to code this hook tool based on my KeyToggleBoot2 code. There was not too much to change. The new tool is called KeyToggleStart and it is configured by the registry:</p>
<pre>            REGEDIT4

            [HKEY_LOCAL_MACHINE\Software\Intermec\KeyToggleStart]
            "ForbiddenKeys"=hex:\
                  72 73 00
            ;max 10 keys!
            "KeySeq"="123"
            "Timeout"=dword:00000003
            "LEDid"=dword:00000001
            "Exe"="\\Windows\\iexplore.exe"
            "Arg"=""</pre>
<h2>Reg keys meaning:</h2>
<p><strong>Forbiddenkeys</strong> is just an addon feature: key codes entered in this list will not be processed any more by your Windows Mobile device. For example, to disable the use of the F3(VK_TTALK) and F4 (VK_TEND) keys you have to enter a binary list of 0&#215;72,0&#215;73,0&#215;00 (the zero is needed to terminate the list).</p>
<p><strong>KeySeq</strong> list the char sequence you want to use to start an application. For example if this is the string &#8220;123&#8243;, everytime you enter 123 in sequence within the given time, the application defined will be started.</p>
<p><strong>TimeOut</strong> is the time in seconds you have to enter the sequence. So do not use a long key sequence as &#8220;starteiexplorenow&#8221; and a short timeout (except you are a very fast type writer). The timeout is started with the first char matching and ends after the time or when you enter a non-matching char of the sequence.</p>
<p>With <strong>LEDid</strong> you can specify a LED index number. LED&#8217;s on Windows Mobile are controlled by an index number, each LED has one or more ID assigned to it. So, with LEDid you can control, which LED will lit, when the matching process is running. You can even find an ID to control a vibration motor, if your Windows Mobile device is equipped with one.</p>
<p>The <strong>Exe</strong> registry string value is used to specify which application will be started when the key sequence is matched.</p>
<p>If the application you want have to be started needs some arguments, you can enter these using the <strong>Arg</strong> registry value.</p>
<p>When you start the KeyToggleStart tool, you will not see any window except for a notification symbol on your Start/Home screen of the device.</p>
<p><a href="http://www.hjgode.de/wp/2011/09/08/keytogglestart-yet-another-usage-for-keyboard-hook/keytogglestart/" rel="attachment wp-att-1205"><img class="alignnone size-medium wp-image-1205" title="KeyToggleStart" src="http://www.hjgode.de/wp/wp-content/uploads/2011/09/KeyToggleStart-225x300.png" alt="" width="225" height="300" /></a></p>
<p>If you tap this icon (redirection sign) you have the chance to end the hook tool.</p>
<p><span id="more-1204"></span>The code itself is nothing special. Only the sequence matching code is a little bit special. As the chars in the sequence do not match keystrokes in a ont-to-one manner, I have to check the shift state of the keyboard and if the current char of the seqeunce is a char needing a shift. For example: the asterisk char (&#8220;*&#8221;) is a combination of the &#8220;8&#8243; key plus the Shift key. So, if you have the &#8220;*&#8221; in the char sequence, the code has to check for the &#8220;8&#8243; key and if the keyboard is in shift state:</p>
<pre lang="cpp">// The command below tells the OS that this EXE has an export function so we can use the global hook without a DLL
__declspec(dllexport) LRESULT CALLBACK g_LLKeyboardHookCallback(
   int nCode,      // The hook code
   WPARAM wParam,  // The window message (WM_KEYUP, WM_KEYDOWN, etc.)
   LPARAM lParam   // A pointer to a struct with information about the pressed key
)
{
    /*    typedef struct {
        DWORD vkCode;
        DWORD scanCode;
        DWORD flags;
        DWORD time;
        ULONG_PTR dwExtraInfo;
    } KBDLLHOOKSTRUCT, *PKBDLLHOOKSTRUCT;*/

    // Get out of hooks ASAP; no modal dialogs or CPU-intensive processes!
    // UI code really should be elsewhere, but this is just a test/prototype app
    // In my limited testing, HC_ACTION is the only value nCode is ever set to in CE
    static int iActOn = HC_ACTION;
    static bool isShifted=false;

#ifdef DEBUG
    static TCHAR str[MAX_PATH];
#endif

    PKBDLLHOOKSTRUCT pkbhData = (PKBDLLHOOKSTRUCT)lParam;
    //DWORD vKey;
    if (nCode == iActOn)
    {
        //only process unflagged keys
        if (pkbhData-&gt;flags != 0x00)
            return CallNextHookEx(g_hInstalledLLKBDhook, nCode, wParam, lParam);
        //check vkCode against forbidden key list
        if(pForbiddenKeyList!=NULL)
        {
            BOOL bForbidden=false;
            int j=0;
            do{
                if(pForbiddenKeyList[j]==(BYTE)pkbhData-&gt;vkCode)
                {
                    bForbidden=true;
                    DEBUGMSG(1, (L"suppressing forbidden key: 0x%0x\n",pkbhData-&gt;vkCode));
                    continue;
                }
                j++;
            }while(!bForbidden &amp;&amp; pForbiddenKeyList[j]!=0x00);
            if(bForbidden){
                return true;
            }
        }

        SHORT sShifted = GetAsyncKeyState(VK_SHIFT);
        if((sShifted &amp; 0x800) == 0x800)
            isShifted = true;
        else
            isShifted = false;

        //check and toggle for Shft Key
        //do not process shift key
        if (pkbhData-&gt;vkCode == VK_SHIFT){
            DEBUGMSG(1, (L"Ignoring VK_SHIFT\n"));
            return CallNextHookEx(g_hInstalledLLKBDhook, nCode, wParam, lParam);
        }

        //################################################################
        //check if the actual key is a match key including the shift state
        if ((byte)pkbhData-&gt;vkCode == (byte)szVKeySeq[iMatched]){
            DEBUGMSG(1 , (L"==== char match\n"));
            if (bCharShiftSeq[iMatched] == isShifted){
                DEBUGMSG(1 , (L"==== shift match\n"));
            }
            else{
                DEBUGMSG(1 , (L"==== shift not match\n"));
            }
        }

        if( wParam == WM_KEYUP ){
            DEBUGMSG(1, (L"---&gt; szVKeySeq[iMatched] = 0x%02x\n", (byte)szVKeySeq[iMatched]));

            if ( ((byte)pkbhData-&gt;vkCode == (byte)szVKeySeq[iMatched]) &amp;&amp; (isShifted == bCharShiftSeq[iMatched]) ) {

                //the first match?
                if(iMatched==0){
                    //start the timer and lit the LED
                    LedOn(LEDid,1);
                    tID=SetTimer(NULL, 0, matchTimeout, (TIMERPROC)Timer2Proc);
                }
                iMatched++;

                DEBUGMSG(1, (L"iMatched is now=%i\n", iMatched));
                //are all keys matched
                if (iMatched == iKeyCount){
                    //show modeless dialog
                    DEBUGMSG(1, (L"FULL MATCH, starting ...\n"));
                    PostMessage(g_hWnd, WM_SHOWMYDIALOG, 0, 0);
                    //reset match pos and stop timer
                    DEBUGMSG(1, (L"FULL MATCH: Reset matching\n"));
                    LedOn(LEDid,0);
                    iMatched=0; //reset match pos
                    KillTimer(NULL, tID);
                    //return CallNextHookEx(g_hInstalledLLKBDhook, nCode, wParam, lParam);
                }
                //return -1; //do not forward key?
            }
            else
            {
                KillTimer(NULL, tID);
                LedOn(LEDid,0);
                iMatched=0; //reset match pos
                DEBUGMSG(1, (L"FULL MATCH missed. Reseting matching\n"));
            }
        } //if wParam == WM_KEY..
    }
    return CallNextHookEx(g_hInstalledLLKBDhook, nCode, wParam, lParam);
}</pre>
<p>Enjoy the code</p>
<p>Download VS2008 Source code for Windows Mobile 6.5.3 SDK<br />
<b>DOWNLOAD:</b><a href="http://www.hjgode.de/wp/wp-content/plugins/download-monitor/download.php?id=143" title="Downloaded 90 times">KeyToggleStart</a> -  (Hits: 90, size: 30.06 kB)</p>
<p>Download KeyToggleStart executable (Windows Mobile 6)<br />
<b>DOWNLOAD:</b><a href="http://www.hjgode.de/wp/wp-content/plugins/download-monitor/download.php?id=144" title="Downloaded 78 times">KeyToggleStart WM6 Executable</a> -  (Hits: 78, size: 12.38 kB)</p>
<!-- Social Bookmarks BEGIN -->
<div class="social_bookmark">
<a><strong><em>Bookmark It</em></strong></a>
<br />
<div class="d">
<br />
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://del.icio.us/post?url=http%3A%2F%2Fwww.hjgode.de%2Fwp%2F2011%2F09%2F08%2Fkeytogglestart-yet-another-usage-for-keyboard-hook%2F&amp;title=KeyToggleStart%3A+Yet+another+usage+for+keyboard+hook" rel="nofollow" title="Add to&nbsp;Del.icio.us"><img class="social_img" src="http://www.hjgode.de/wp/wp-content/plugins/social-bookmarks0/images/delicious.png" title="Add to&nbsp;Del.icio.us" alt="Add to&nbsp;Del.icio.us" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.hjgode.de%2Fwp%2F2011%2F09%2F08%2Fkeytogglestart-yet-another-usage-for-keyboard-hook%2F&amp;title=KeyToggleStart%3A+Yet+another+usage+for+keyboard+hook" rel="nofollow" title="Add to&nbsp;digg"><img class="social_img" src="http://www.hjgode.de/wp/wp-content/plugins/social-bookmarks0/images/digg.png" title="Add to&nbsp;digg" alt="Add to&nbsp;digg" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.google.com/bookmarks/mark?op=edit&amp;output=popup&amp;bkmk=http%3A%2F%2Fwww.hjgode.de%2Fwp%2F2011%2F09%2F08%2Fkeytogglestart-yet-another-usage-for-keyboard-hook%2F&amp;title=KeyToggleStart%3A+Yet+another+usage+for+keyboard+hook" rel="nofollow" title="Add to&nbsp;Google Bookmarks"><img class="social_img" src="http://www.hjgode.de/wp/wp-content/plugins/social-bookmarks0/images/google.png" title="Add to&nbsp;Google Bookmarks" alt="Add to&nbsp;Google Bookmarks" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.netscape.com/submit/?U=http%3A%2F%2Fwww.hjgode.de%2Fwp%2F2011%2F09%2F08%2Fkeytogglestart-yet-another-usage-for-keyboard-hook%2F&amp;T=KeyToggleStart%3A+Yet+another+usage+for+keyboard+hook" rel="nofollow" title="Add to&nbsp;Netscape"><img class="social_img" src="http://www.hjgode.de/wp/wp-content/plugins/social-bookmarks0/images/netscape.png" title="Add to&nbsp;Netscape" alt="Add to&nbsp;Netscape" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.technorati.com/faves?add=http%3A%2F%2Fwww.hjgode.de%2Fwp%2F2011%2F09%2F08%2Fkeytogglestart-yet-another-usage-for-keyboard-hook%2F" rel="nofollow" title="Add to&nbsp;Technorati"><img class="social_img" src="http://www.hjgode.de/wp/wp-content/plugins/social-bookmarks0/images/technorati.png" title="Add to&nbsp;Technorati" alt="Add to&nbsp;Technorati" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://myweb2.search.yahoo.com/myresults/bookmarklet?u=http%3A%2F%2Fwww.hjgode.de%2Fwp%2F2011%2F09%2F08%2Fkeytogglestart-yet-another-usage-for-keyboard-hook%2F&amp;t=KeyToggleStart%3A+Yet+another+usage+for+keyboard+hook" rel="nofollow" title="Add to&nbsp;Yahoo My Web"><img class="social_img" src="http://www.hjgode.de/wp/wp-content/plugins/social-bookmarks0/images/yahoo.png" title="Add to&nbsp;Yahoo My Web" alt="Add to&nbsp;Yahoo My Web" /></a>
<br />
</div>
</div>
<!-- Social Bookmarks END -->
]]></content:encoded>
			<wfw:commentRss>http://www.hjgode.de/wp/2011/09/08/keytogglestart-yet-another-usage-for-keyboard-hook/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Remote Desktop Mobile on VGA devices: QVGA applications do not scale well</title>
		<link>http://www.hjgode.de/wp/2011/09/05/remote-desktop-mobile-on-vga-devices-qvga-applications-do-not-scale-well/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=remote-desktop-mobile-on-vga-devices-qvga-applications-do-not-scale-well</link>
		<comments>http://www.hjgode.de/wp/2011/09/05/remote-desktop-mobile-on-vga-devices-qvga-applications-do-not-scale-well/#comments</comments>
		<pubDate>Mon, 05 Sep 2011 11:37:51 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[CodeProject]]></category>
		<category><![CDATA[Int*rm*c]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[Utilities]]></category>
		<category><![CDATA[HI_RES_AWARE]]></category>
		<category><![CDATA[QVGA]]></category>
		<category><![CDATA[rdp]]></category>
		<category><![CDATA[remote desktop mobile]]></category>
		<category><![CDATA[VGA]]></category>
		<category><![CDATA[Windows Mobile 6.5.3]]></category>
		<category><![CDATA[wpctsc.exe]]></category>

		<guid isPermaLink="false">http://www.hjgode.de/wp/?p=1184</guid>
		<description><![CDATA[Hi there are now more and more full VGA rugged devices coming. And some customers are still using Remote Desktop Mobile to run there application on the small screens. Unfortunately some of the coders use application screen layouts hard coded to QVGA (240&#215;320). Now with a VGA capable Windows Mobile device they get weird screens [...]]]></description>
			<content:encoded><![CDATA[<p>Hi</p>
<p>there are now more and more full VGA rugged devices coming. And some customers are still using Remote Desktop Mobile to run there application on the small screens. Unfortunately some of the coders use application screen layouts hard coded to QVGA (240&#215;320). Now with a VGA capable Windows Mobile device they get weird screens on the device.</p>
<p>The client (Remote Desktop Mobile) sends the server information about there screen sizes. As a VGA device can display 480&#215;640 pixels, the hard coded 240&#215;320 applications only use a quarter of the screen. The texts are very small and more or less unreadable.</p>
<p><span id="more-1184"></span>The terminal server gets client resolution information:</p>
<p><a href="http://www.hjgode.de/wp/2011/09/05/remote-desktop-mobile-on-vga-devices-qvga-applications-do-not-scale-well/tsmanager_vga_unhacked/" rel="attachment wp-att-1186"><img class="aligncenter size-full wp-image-1186" title="TSManager_VGA_unhacked" src="http://www.hjgode.de/wp/wp-content/uploads/2011/09/TSManager_VGA_unhacked.gif" alt="" width="637" height="353" /></a> Unscaled (left) VGA display of a QVGA application (with &#8220;Fit remote desktop to screen&#8221; NOT CHECKED) and on the right the same application with internal autoadjust to workscreen size:</p>
<p><a href="http://www.hjgode.de/wp/2011/09/05/remote-desktop-mobile-on-vga-devices-qvga-applications-do-not-scale-well/qvga_fixed_form_on_vga_screen_nofittoscreen/" rel="attachment wp-att-1187"><img class="alignnone size-medium wp-image-1187" title="QVGA_fixed_form_on_VGA_screen_noFitToScreen" src="http://www.hjgode.de/wp/wp-content/uploads/2011/09/QVGA_fixed_form_on_VGA_screen_noFitToScreen-225x300.gif" alt="" width="225" height="300" /></a>  <a href="http://www.hjgode.de/wp/2011/09/05/remote-desktop-mobile-on-vga-devices-qvga-applications-do-not-scale-well/rdm_options/" rel="attachment wp-att-1189"><img class="alignnone size-medium wp-image-1189" title="RDM_options" src="http://www.hjgode.de/wp/wp-content/uploads/2011/09/RDM_options-225x300.gif" alt="" width="225" height="300" /></a>  <a href="http://www.hjgode.de/wp/2011/09/05/remote-desktop-mobile-on-vga-devices-qvga-applications-do-not-scale-well/qvga_autoscale_form_on_vga_screen/" rel="attachment wp-att-1190"><img class="alignnone size-medium wp-image-1190" title="QVGA_autoscale_form_on_VGA_screen" src="http://www.hjgode.de/wp/wp-content/uploads/2011/09/QVGA_autoscale_form_on_VGA_screen-225x300.gif" alt="" width="225" height="300" /></a></p>
<p>As you can see in the right image above this line, it is no problem to show a form designed for QVGA to scale nice with the use of some code (as using WorkingArea.Width/Height and a table layout). But in the left image you see what happens to hard coded designed applications.</p>
<p>If you have the source code, you should change the design of your dialogs to be resolution aware, so it scales fine for QVGA and VGA (and whatever comes next).</p>
<p>If you do not have the code or can not change the application, you have to tell Windows Mobile to behave like the Remote Desktop Mobile application is NOT <a href="http://msdn.microsoft.com/en-us/library/bb416287.aspx" target="_blank">HI_RES_AWARE</a>. That means you need to hack the exe file. I took a look at the Windows Mobile 6.5.3 wpctsc.exe (the Remote Desktop Mobile executable) and did not find the HI_RES_AWARE resource, so the OS must use the other mark to see that wpctsc.exe is HI_RES_AWARE. And yes, indeed, the PE header shows that wpctsc.exe has a subystem version of 5.2. With some PEInfo tool, you can hack the major subsystem version and just change it from 5 to 4.</p>
<p>When you start a application that is not HI_RES_AWARE, the Windows Mobile 6.5.3 OS will scale all UI elements for the application and the app will look fine and not only fill a quarter of the VGA screen. After changing the major subsystem version number, the first thing you will notice is the more coarse display of the menu items in the menu bar:</p>
<p><a href="http://www.hjgode.de/wp/2011/09/05/remote-desktop-mobile-on-vga-devices-qvga-applications-do-not-scale-well/rdm_startscreen_vga/" rel="attachment wp-att-1193"><img class="alignnone size-medium wp-image-1193" title="RDM_startscreen_VGA" src="http://www.hjgode.de/wp/wp-content/uploads/2011/09/RDM_startscreen_VGA-225x300.gif" alt="" width="225" height="300" /></a>   <a href="http://www.hjgode.de/wp/2011/09/05/remote-desktop-mobile-on-vga-devices-qvga-applications-do-not-scale-well/rdm_startscreen_qvga/" rel="attachment wp-att-1194"><img class="alignnone size-medium wp-image-1194" title="RDM_startscreen_QVGA" src="http://www.hjgode.de/wp/wp-content/uploads/2011/09/RDM_startscreen_QVGA-225x300.gif" alt="" width="225" height="300" /></a></p>
<p>Left is the HI_RES_AWARE original app and on the right we have the hacked one (take a closer look ate the ellipses around the menu items).</p>
<p>When you use the hacked, not HI_RES_AWARE, application, the terminal server will see the client supports QVGA only (Client Resolution) and your hard coded application screens will look the same as on a QVGA capable device:</p>
<p><a href="http://www.hjgode.de/wp/2011/09/05/remote-desktop-mobile-on-vga-devices-qvga-applications-do-not-scale-well/qvga-form_on_qvga-screen/" rel="attachment wp-att-1195"><img class="alignnone size-medium wp-image-1195" title="QVGA-form_on_QVGA-screen" src="http://www.hjgode.de/wp/wp-content/uploads/2011/09/QVGA-form_on_QVGA-screen-225x300.gif" alt="" width="225" height="300" /></a>   <a href="http://www.hjgode.de/wp/2011/09/05/remote-desktop-mobile-on-vga-devices-qvga-applications-do-not-scale-well/tsmanager_qvga_hacked_nofittoscreen-2/" rel="attachment wp-att-1197"><img class="alignnone size-full wp-image-1197" title="TSManager_QVGA_hacked_noFitToScreen" src="http://www.hjgode.de/wp/wp-content/uploads/2011/09/TSManager_QVGA_hacked_noFitToScreen1.gif" alt="" width="637" height="354" /></a></p>
<p>The attached wpctsc.exe is the hacked one with a subsystem major version number of 4 instead of 5. Use this on your Windows Mobile 6.5.3 device at your own risk. The file is not signed as the device I work with are not requiring signed exe files. The change to the exe file (after I dumped the OS files to my PC using itsutils) was simply done with mgeeky&#8217;s PEinfo code at <a href="https://github.com/mgeeky/PEInfo" target="_blank">GitHub</a>.</p>
<p>If you can not copy the file on top of the original one on the device (\Windows\wpctsc.exe), you can use the syscache feature. Copy the wpctsc.exe to \Windows\System\SysCache directory and reboot the device. If the directory does not exist you just have to create it manually.</p>
<p>If you want to get the old wpctsc.exe back, just delete the file you copied. As the original wpctsc.exe is part of the OS (a XIP file), you can not delete the file but you can copy a file with the same name on top of it. When you delete this copied file, the original is back in place. So, there is no harm in testinng the exe.</p>
<b>DOWNLOAD:</b><a href="http://www.hjgode.de/wp/wp-content/plugins/download-monitor/download.php?id=142" title="Downloaded 242 times">wpctsc.exe with major subsystem version number = 4</a> -  (Hits: 242, size: 40.21 kB)
<!-- Social Bookmarks BEGIN -->
<div class="social_bookmark">
<a><strong><em>Bookmark It</em></strong></a>
<br />
<div class="d">
<br />
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://del.icio.us/post?url=http%3A%2F%2Fwww.hjgode.de%2Fwp%2F2011%2F09%2F05%2Fremote-desktop-mobile-on-vga-devices-qvga-applications-do-not-scale-well%2F&amp;title=Remote+Desktop+Mobile+on+VGA+devices%3A+QVGA+applications+do+not+scale+well" rel="nofollow" title="Add to&nbsp;Del.icio.us"><img class="social_img" src="http://www.hjgode.de/wp/wp-content/plugins/social-bookmarks0/images/delicious.png" title="Add to&nbsp;Del.icio.us" alt="Add to&nbsp;Del.icio.us" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.hjgode.de%2Fwp%2F2011%2F09%2F05%2Fremote-desktop-mobile-on-vga-devices-qvga-applications-do-not-scale-well%2F&amp;title=Remote+Desktop+Mobile+on+VGA+devices%3A+QVGA+applications+do+not+scale+well" rel="nofollow" title="Add to&nbsp;digg"><img class="social_img" src="http://www.hjgode.de/wp/wp-content/plugins/social-bookmarks0/images/digg.png" title="Add to&nbsp;digg" alt="Add to&nbsp;digg" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.google.com/bookmarks/mark?op=edit&amp;output=popup&amp;bkmk=http%3A%2F%2Fwww.hjgode.de%2Fwp%2F2011%2F09%2F05%2Fremote-desktop-mobile-on-vga-devices-qvga-applications-do-not-scale-well%2F&amp;title=Remote+Desktop+Mobile+on+VGA+devices%3A+QVGA+applications+do+not+scale+well" rel="nofollow" title="Add to&nbsp;Google Bookmarks"><img class="social_img" src="http://www.hjgode.de/wp/wp-content/plugins/social-bookmarks0/images/google.png" title="Add to&nbsp;Google Bookmarks" alt="Add to&nbsp;Google Bookmarks" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.netscape.com/submit/?U=http%3A%2F%2Fwww.hjgode.de%2Fwp%2F2011%2F09%2F05%2Fremote-desktop-mobile-on-vga-devices-qvga-applications-do-not-scale-well%2F&amp;T=Remote+Desktop+Mobile+on+VGA+devices%3A+QVGA+applications+do+not+scale+well" rel="nofollow" title="Add to&nbsp;Netscape"><img class="social_img" src="http://www.hjgode.de/wp/wp-content/plugins/social-bookmarks0/images/netscape.png" title="Add to&nbsp;Netscape" alt="Add to&nbsp;Netscape" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.technorati.com/faves?add=http%3A%2F%2Fwww.hjgode.de%2Fwp%2F2011%2F09%2F05%2Fremote-desktop-mobile-on-vga-devices-qvga-applications-do-not-scale-well%2F" rel="nofollow" title="Add to&nbsp;Technorati"><img class="social_img" src="http://www.hjgode.de/wp/wp-content/plugins/social-bookmarks0/images/technorati.png" title="Add to&nbsp;Technorati" alt="Add to&nbsp;Technorati" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://myweb2.search.yahoo.com/myresults/bookmarklet?u=http%3A%2F%2Fwww.hjgode.de%2Fwp%2F2011%2F09%2F05%2Fremote-desktop-mobile-on-vga-devices-qvga-applications-do-not-scale-well%2F&amp;t=Remote+Desktop+Mobile+on+VGA+devices%3A+QVGA+applications+do+not+scale+well" rel="nofollow" title="Add to&nbsp;Yahoo My Web"><img class="social_img" src="http://www.hjgode.de/wp/wp-content/plugins/social-bookmarks0/images/yahoo.png" title="Add to&nbsp;Yahoo My Web" alt="Add to&nbsp;Yahoo My Web" /></a>
<br />
</div>
</div>
<!-- Social Bookmarks END -->
]]></content:encoded>
			<wfw:commentRss>http://www.hjgode.de/wp/2011/09/05/remote-desktop-mobile-on-vga-devices-qvga-applications-do-not-scale-well/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

