<?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>programming with passion &#187; Windows Mobile</title>
	<atom:link href="http://www.jasonrowland.com/category/mobile-devices/windows-mobile/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.jasonrowland.com</link>
	<description>Learning Mac, Ruby, iPhone, BlackBerry, Android, WinMobile</description>
	<lastBuildDate>Fri, 30 Jul 2010 21:01:35 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>UPDATE: Windows Mobile 6 Smart Phone Signed Cab displaying “Program is from an unknown publisher”</title>
		<link>http://www.jasonrowland.com/2010/03/update-windows-mobile-6-smart-phone-signed-cab-displaying-%e2%80%9cprogram-is-from-an-unknown-publisher%e2%80%9d/</link>
		<comments>http://www.jasonrowland.com/2010/03/update-windows-mobile-6-smart-phone-signed-cab-displaying-%e2%80%9cprogram-is-from-an-unknown-publisher%e2%80%9d/#comments</comments>
		<pubDate>Tue, 02 Mar 2010 23:37:22 +0000</pubDate>
		<dc:creator>jason</dc:creator>
				<category><![CDATA[Windows Mobile]]></category>

		<guid isPermaLink="false">http://www.jasonrowland.com/?p=295</guid>
		<description><![CDATA[Previously, I wrote about signing cab files for Windows Mobile 6.  The application was initially created for Windows Mobile 5 Pocket PC devices.  We got it working on Windows Mobile 6 Pocket PC.
Recently, I was tasked with creating an installer application to get around some of the browser inconsistencies they&#8217;ve been experiencing with the various [...]]]></description>
			<content:encoded><![CDATA[<p>Previously, I wrote about <a href="http://www.jasonrowland.com/2009/08/windows-mobile-6-signed-cab-displaying-program-is-from-an-unknown-publisher/">signing cab files for Windows Mobile 6</a>.  The application was initially created for Windows Mobile 5 Pocket PC devices.  We got it working on Windows Mobile 6 Pocket PC.</p>
<p>Recently, I was tasked with creating an installer application to get around some of the browser inconsistencies they&#8217;ve been experiencing with the various Smart Phones.  They have an installer app that has an executable and an XML file that the executable reads for it&#8217;s configuration.  Pocket PC allows you to download the XML file and the executable file and everything just worked.  The Smart Phones do not behave this way.  I created an app that downloads both the EXE and the XML file to the My Documents directory and launches the EXE.  Works great.</p>
<p>My problems started when I tried to cab up the whole thing and install it from a mobile device.  I signed each file inside the cab as well as the cab itself.  I kept getting prompted by the device asking me if I want to trust this unknown publisher?  At first, I thought maybe I had screwed up the signing.  Turns out that no, I did sign it correctly&#8230; for windows clients.  The Windows Mobile platform uses a different technology than Authenticode.</p>
<p>On this MSDN article about how to <a href="http://msdn.microsoft.com/en-us/dd569931.aspx">Sign your Windows Mobile Application</a>, it states very clearly: &#8221;Authenticode signatures for other Windows platforms, such as Windows Client or Windows Server, use a different technology than Windows Mobile code signing and are not recognized as valid normal or privileged mode signatures.&#8221;  What I don&#8217;t yet understand is that it states Windows Mobile (not Smart Phone) uses a different technology, yet we used Authenticode to make the prompts go away for the Pocket PCs we were testing on (Windows Mobile 5 and 6).</p>
<p>The Windows Mobile code signing seems very expensive.  From what I can tell it costs $350 for 10 signings.  There is an additional fee for each signing after that.  What this means is that you better be darn sure your application is finished before signing your application.  I&#8217;ve read that you have to submit your signed cab to Verisign who then signs your cab file with their certificate.  I am beginning to hate the Windows Mobile platform and might actively root for their demise&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jasonrowland.com/2010/03/update-windows-mobile-6-smart-phone-signed-cab-displaying-%e2%80%9cprogram-is-from-an-unknown-publisher%e2%80%9d/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Controls for Windows Mobile Smart Phones</title>
		<link>http://www.jasonrowland.com/2010/02/controls-for-windows-mobile-smart-phones/</link>
		<comments>http://www.jasonrowland.com/2010/02/controls-for-windows-mobile-smart-phones/#comments</comments>
		<pubDate>Fri, 05 Feb 2010 15:56:15 +0000</pubDate>
		<dc:creator>jason</dc:creator>
				<category><![CDATA[Windows Mobile]]></category>

		<guid isPermaLink="false">http://www.jasonrowland.com/?p=265</guid>
		<description><![CDATA[I ran into Smart Phone not supporting another control.  It doesn&#8217;t support button controls.  The Smart Phone has a menu at the bottom that behaves as a button.
I seem to have troubles finding this article when I need it, so here is a link to help me figure out the user interface options I have [...]]]></description>
			<content:encoded><![CDATA[<p>I ran into Smart Phone not supporting another control.  It doesn&#8217;t support button controls.  The Smart Phone has a menu at the bottom that behaves as a button.</p>
<p>I seem to have troubles finding this article when I need it, so here is a link to help me figure out the user interface options I have for the SmartPhone:</p>
<p><a href="http://msdn.microsoft.com/en-us/library/aa446513.aspx#smartphoneuserinterface_topic3">http://msdn.microsoft.com/en-us/library/aa446513.aspx#smartphoneuserinterface_topic3</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.jasonrowland.com/2010/02/controls-for-windows-mobile-smart-phones/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Windows Mobile Smartphone vs Pocket PC</title>
		<link>http://www.jasonrowland.com/2009/12/windows-mobile-smartphone-vs-pocket-pc/</link>
		<comments>http://www.jasonrowland.com/2009/12/windows-mobile-smartphone-vs-pocket-pc/#comments</comments>
		<pubDate>Mon, 21 Dec 2009 03:10:53 +0000</pubDate>
		<dc:creator>jason</dc:creator>
				<category><![CDATA[Mobile Devices]]></category>
		<category><![CDATA[Windows Mobile]]></category>

		<guid isPermaLink="false">http://www.jasonrowland.com/?p=169</guid>
		<description><![CDATA[I recently encountered an issue where a Windows Mobile 5 application I wrote wasn&#8217;t working on a Windows Mobile 6 smart phone.  This particular phone was in Spain so I was not able to hold it in my hands.
Initially I believed it was because I didn&#8217;t have the Windows Mobile 6 SDK installed.  I needed [...]]]></description>
			<content:encoded><![CDATA[<p>I recently encountered an issue where a Windows Mobile 5 application I wrote wasn&#8217;t working on a Windows Mobile 6 smart phone.  This particular phone was in Spain so I was not able to hold it in my hands.</p>
<p>Initially I believed it was because I didn&#8217;t have the Windows Mobile 6 SDK installed.  I needed the app to be backward compatible to Windows Mobile 5 so I haven&#8217;t messed around with the new SDK yet.  When I looked (skimmed) through the documentation, everything led me to believe that most windows mobile 5 apps will run on a Windows Mobile 6 device.  There is the exception that if you are using undocumented APIs, they aren&#8217;t guaranteed to work.  Since the app I&#8217;m working on logs GPS coordinates in the background, it was possible that I was using some calls through a 3rd party library.</p>
<p>Turns out my problem was much more basic.  Once I got my hands on an actual Windows Mobile 5 smart device to test on, I discovered the problem right away.  The app was failing when it tried to create a list box.  My simplistic thinking was that you write applications for &#8220;Windows Mobile 5&#8243;.  You actually write for either Windows Mobile Smartphones or Windows Mobile Pocket PCs.  One is more limited than the other.  The naming is still confusing to me.  My iPhone is a &#8220;smart phone&#8221; so I assumed that Smartphone was simply Pocket PC + phone.  WRONG.  Windows Mobile 6 makes it even worse.  They label one sdk &#8220;standard&#8221; and the other &#8220;professional&#8221;.  I am pretty sure professional = pocket pc = more functionality.</p>
<p>So I learned that if you want to write lowest common denominator applications for Windows Mobile, you need to target the smart phone.  And you should really test your interface at different resolutions because those smart phones have tiny screens.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jasonrowland.com/2009/12/windows-mobile-smartphone-vs-pocket-pc/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Windows Mobile 6 Signed Cab displaying &#8220;Program is from an unknown publisher&#8221;</title>
		<link>http://www.jasonrowland.com/2009/08/windows-mobile-6-signed-cab-displaying-program-is-from-an-unknown-publisher/</link>
		<comments>http://www.jasonrowland.com/2009/08/windows-mobile-6-signed-cab-displaying-program-is-from-an-unknown-publisher/#comments</comments>
		<pubDate>Tue, 11 Aug 2009 18:29:26 +0000</pubDate>
		<dc:creator>jason</dc:creator>
				<category><![CDATA[Windows Mobile]]></category>

		<guid isPermaLink="false">http://www.jasonrowland.com/?p=62</guid>
		<description><![CDATA[UPDATE:  Apparently, there is a different technology than Authenticode that I should be using for Windows Mobile.
After signing the EXE and the CAB file, this worked just fine on Windows Mobile 5.  When testing on Windows Mobile 6, I got the following error: &#8220;program is from an unknown publisher&#8221;.  Not only must the EXE and CAB [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.jasonrowland.com/2010/03/update-windows-mobile-6-smart-phone-signed-cab-displaying-“program-is-from-an-unknown-publisher”/">UPDATE</a>:  Apparently, there is a different technology than Authenticode that I should be using for Windows Mobile.</p>
<p>After signing the EXE and the CAB file, this worked just fine on Windows Mobile 5.  When testing on Windows Mobile 6, I got the following error: &#8220;program is from an unknown publisher&#8221;.  Not only must the EXE and CAB file be signed, but all the DLLs inside the CAB must be signed too.  There are two ways to accomplish this.</p>
<p>The first method is to simply add the signtool commands mentioned in my <a href="http://www.jasonrowland.com/?p=55">previous post</a> to sign the DLLs.  Aftter the DLLs are signed, you cab up all the files using CabWiz.exe. Then you sign the cab file itself.</p>
<p>The second method is to use the utility CabSignTool.exe from Microsoft.  This handy utility explodes a CAB file, signs every executable and DLL file inside, then recabs it and signs the CAB file.  In order to use it, you will need to download and install the <a href="http://www.microsoft.com/downloads/details.aspx?familyid=06111A3A-A651-4745-88EF-3D48091A390B&amp;displaylang=en">Windows Mobile 6 SDK</a>.  The tool is located in &lt;WindowsMobile6SDK&gt;/Tools/Security/CabSignTool.  Make sure this is in your path.  The cabsigntool takes most of the same arguments as the signtool.  The only differences are that the first two parameters are the input and output cab names and the &#8220;sign&#8221; command is not necessary.  So to accomplish signing the cab, do something like the following:<br />
<code><br />
c:&gt; cabsigntool.exe cabinput.cab caboutput.cab /f [yourcert.pfx] /p [yourpassword] /t [yourtimeserver]</code></p>
<p>When you execute this command, it will extract the contents of your cab file.  It will sign each file inside.  It will then recab the files and sign the cab file.  So you can accomplish with one command what it took multiple lines to do with signtool.exe alone.</p>
<p><a href="http://msdn.microsoft.com/en-us/library/aa924367.aspx">http://msdn.microsoft.com/en-us/library/aa924367.aspx</a><br />
<a href="http://msdn.microsoft.com/en-us/library/bb278115.aspx">http://msdn.microsoft.com/en-us/library/bb278115.aspx</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.jasonrowland.com/2009/08/windows-mobile-6-signed-cab-displaying-program-is-from-an-unknown-publisher/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Windows Mobile application signing</title>
		<link>http://www.jasonrowland.com/2009/08/windows-mobile-application-signing/</link>
		<comments>http://www.jasonrowland.com/2009/08/windows-mobile-application-signing/#comments</comments>
		<pubDate>Tue, 11 Aug 2009 00:23:47 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Windows Mobile]]></category>

		<guid isPermaLink="false">http://www.jasonrowland.com/?p=55</guid>
		<description><![CDATA[UPDATE:  Apparently, there is a different technology than Authenticode that I should be using for Windows Mobile.
Most of the documentation to sign code for the Windows Mobile device assumes you want to do it all through the Visual Studio enviornment.  Well I don&#8217;t.  Here is what you need to do to get your application signed [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.jasonrowland.com/2010/03/update-windows-mobile-6-smart-phone-signed-cab-displaying-“program-is-from-an-unknown-publisher”/">UPDATE</a>:  Apparently, there is a different technology than Authenticode that I should be using for Windows Mobile.</p>
<p>Most of the documentation to sign code for the Windows Mobile device assumes you want to do it all through the Visual Studio enviornment.  Well I don&#8217;t.  Here is what you need to do to get your application signed as well as the install cab created and signed using the command line.</p>
<p>First, get your certificate from verisign, godaddy, or some other certificate authority.  Follow their directions to install it in your store and create a *.pfx file.   I used godaddy <a href="http://help.godaddy.com/article/5087">http://help.godaddy.com/article/5087</a>.</p>
<p>Sign the exe using the signtool.exe</p>
<p><code>signtool sign /f {yourcert.pfx} /p {yourpassword} /t {http://yourtimeserver} {yourexe}</code></p>
<p>Second, You will need an ini file that cabwiz.exe will use to create the cab file.  The easiest thing is to create a SmartDeviceCab project and use Visual Studio to determine what you will install on the device.  When you compile this SmartDeviceCab project, it creates an ini file.  You use this ini file to create your CAB file as your starting point.  Run the following command to create the cab file:</p>
<p><code>cabwiz.exe your.inf /cpu CEDevice /compress</code></p>
<p>After you have created your cab file, you can then sign the cab file the same as you signed your EXE.  That should be all there is to it.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jasonrowland.com/2009/08/windows-mobile-application-signing/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Windows Mobile i18n fun</title>
		<link>http://www.jasonrowland.com/2009/08/windows-mobile-i18n-fun/</link>
		<comments>http://www.jasonrowland.com/2009/08/windows-mobile-i18n-fun/#comments</comments>
		<pubDate>Mon, 10 Aug 2009 23:34:55 +0000</pubDate>
		<dc:creator>jason</dc:creator>
				<category><![CDATA[Windows Mobile]]></category>

		<guid isPermaLink="false">http://www.jasonrowland.com/?p=38</guid>
		<description><![CDATA[Looks like I&#8217;ll be doing some Windows Mobile development again since it is going to pay the bills for a bit.  Working with CloudSync on their GPS Logging utility.  The devices basically log the GPS data at 5 second intervals.  This data is then sent in batch to the servers for further processing.
The issue I [...]]]></description>
			<content:encoded><![CDATA[<p>Looks like I&#8217;ll be doing some Windows Mobile development again since it is going to pay the bills for a bit.  Working with CloudSync on their GPS Logging utility.  The devices basically log the GPS data at 5 second intervals.  This data is then sent in batch to the servers for further processing.</p>
<p style="text-align: justify;">The issue I worked on was making sure the data gets the server in a format that the PHP folks can recognize.  Internationalization (i18n) created a problem because the dates and numbers were being sent in a different format. In Chile for instance, the dates and numbers were not coming out as we expected.</p>
<p><code> currentLatitude.ToString("#0.00000");<br />
// this came out as 0,00000</code><br />
<code><br />
gpsTime.ToString("MM/dd/yyyy HH:mm:ss");<br />
// This came out as MM-dd-yyyy HH:mm:ss</code></p>
<p>Apparently, .NET converts these for you based on the NumberFormatInfo object and the DateTimeFormatInfo objects.   I thought an easy way to correct this would be to set the current thread locale to be that of US so I could send the data in the expected format.  In the full .NET world, you could write something like this to accomplish it:<br />
<a href="http://msdn.microsoft.com/en-us/library/system.globalization.cultureinfo(VS.71).aspx">http://msdn.microsoft.com/en-us/library/system.globalization.cultureinfo(VS.71).aspx</a></p>
<p><code>Thread.CurrentThread.CurrentCulture = new CultureInfo("en-US");</code></p>
<p style="text-align: justify;">Unfortunately, the CurrentCulture property on the thread object is not available in the compact framework.  Instead, you need to pass the culture object along with the format in the toString methods. You could create a CultureInfo object such as &#8220;en-US&#8221; and pass this, but .NET provides a better alternative.  The CultureInfo object has  a property called InvariantCulture.  Using this object ensures that the behavior is consistent across all the different cultures.</p>
<p style="text-align: justify;"><code>currentLatitude.ToString("#0.00000", CultureInfo.InvariantCulture);<br />
gpsTime.ToString("MM/dd/yyyy HH:mm:ss", CultureInfo.InvariantCulture);<br />
</code></p>
<p>After doing this, it is exactly as one would expect.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jasonrowland.com/2009/08/windows-mobile-i18n-fun/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
