Archive for the ‘Blog’ Category

BUILDREL Flag I Never Knew About

Wednesday, August 19th, 2009

I just noticed this:

[-f]: Does not copy any binaries which would have been copied because of the WINCEREL flag. Meant as an optimization for people who keep this  flag set and need to freshen up the release directory.

I am the people they are talking about.  I always thought the double-copy was an unavoidable drawback when you automatically copy files to the release directory every time you incrementally build something.

Windows Mobile Marketplace Open to Developers

Wednesday, May 13th, 2009

Microsoft just announced that developers may now submit applications to the Windows Mobile Marketplace, which was announced long ago.  Developers pay a $99 annual fee to submit up to five applications per year and every additional app is another $99 to submit.  Applications are subject to a 70% developer commission.  There is still no official word as to when the Marketplace will be open for business.

Smartphones Still Performing Despite Economy

Tuesday, April 28th, 2009

Infonetics has an interesting piece on the resilience of Smartphones in the current economic climate.  Despite a projected 8% drop in the total number of mobile phones sold in 2009, Smartphones are expected to “show modest growth in 2009, and will be the only mobile phone segment to maintain annual revenue growth over the next five years, and the only to post double-digit annual revenue growth from 2011 through 2013.”

Also, Smartphones outperformed other cellular “market segments” in 2008 and actually showed growth in the second half of the last year.

On Competing Smartphone Platforms

Thursday, April 9th, 2009

I read a lot of comments on tech blogs about the various smartphone operating systems.  There is obviously a lot of anti-Microsoft sentiment on many of them which I think stems from Microsoft’s hegemony in the desktop world and spills over into the embedded space.

Windows Mobile is not a perfect operating system.  It has its pros and cons.  It is seamlessly integrated with Outlook, which is important to business people, and because it shares development APIs with desktop Windows it has a huge developer base.  On the other hand, because Microsoft does not control the hardware on which the operating system runs it suffers from inconsistent performance and stability in spite of the LTK testing that Microsoft requires that OEMs pass before they ship.  The UI does not have a unified philosophy and is sometimes janky.  For now (even on WM6.5) there are some things you still really need a stylus for.

Other operating systems seem to not have this problem.  The iPhone, which is a slick product by any standard, has problems that are downplayed because people are so excited to have an iPhone.  I have a friend with an iPhone and things he has mentioned to me about it include “it’s usually stuck on 2G data service”, “it drops calls a lot” and “it crashes sometimes”.  Some of these might be AT&T’s problems, but Apple Fanboism (which I suffer from a bit too, as a Mac/iPod user) causes these problems to be overlooked.

Android, which is currently only available on a single mediocre phone, is another thing people are very excited about.  Why? It’s open source, but a lot of the hype is that it comes from Google, a company that engenders a lot of goodwill, both because its browser is indispensible and because it’s perhaps poised to unseat Microsoft’s dominance through web-based apps and other things.  Maybe I’m being skeptical, but I think people are a bit too keen on getting a new platform over which Google can direct their targeted advertising.

The Palm Pre, based on Palm’s new WebOS, is not even out yet but people are foaming at the mouth over it.  I’m glad that Palm has not faded into obscurity and I hope this platform does well for them.

RIM’s Blackberry is still huge but is losing ground to the iPhone.  Nevertheless, they have now sold over 50 million devices.  What started as a business device is transitioning very well to a consumer device.  The touch-screen enabled Storm has had some bad reviews but at least it’s being judged on its merits, not on hype.

As for Windows Mobile, I’m rooting for it.  I hope that WM7 is worth the wait.  I have been playing with 6.5 and I think it’s a step in the right direction.  I just hope people’s experience with the BSOD on desktop Windows does not color their judgment on future WM phones.

Quick Way to Display Multi-Byte Strings

Thursday, March 26th, 2009

Windows CE almost exclusively uses wide-character (two bytes per character) strings, and if you have to present a “multi-byte string” (i.e. a string composed of single-byte characters) you usually have to use one of the conversion functions like

size_t mbstowcs(
wchar_t* wcstr,
const char* mbstr,
size_t count
);

which is an ANSI function that converts multi-byte strings to wide-character strings using your current codepage (which can be set with SetLocale()) , or

int MultiByteToWideChar(
UINT CodePage,
DWORD dwFlags,
LPCSTR lpMultiByteStr,
int cbMultiByte,
LPWSTR lpWideCharStr,
int cchWideChar
);

which is a Windows function that actually accepts a codepage as a parameter.

However, if you want to quickly combine wide-character and multi-byte strings, you can do it simply with the %hs  format specifier like this:

char s[] = “Multi-byte String”;
RETAILMSG(1, (L”This string is no longer a  %hs\r\n”, s));

// note: the (L”") macro defines that the string in quotes is wide char

No More Honeycomb UI for WM6.5

Friday, March 20th, 2009

Here’s an update about the Windows Mobile 6.5 UI, which was intially intended to have a hexagonal “honeycomb” appearance, presumably to differentiate itself from the iPhone UI.  Response to the clearly-rendered hexagons was not postive, so even though the icons are still placed the same as they were the lines are gone.

Microsoft Reader for PPC

Friday, February 27th, 2009

I found a neat utility called Reader Studio that converts .txt files to .lit files, which is the ebook format used by Microsoft Reader.  You can go to websites like Project Gutenberg to download the raw text of thousands of classic novels and then convert them with this utility for free.   You can download Reader Studio here.

PREfast

Wednesday, January 28th, 2009

PREfast is a C/C++ static source code analysis tool that comes with Platform Builder for Windows CE/Windows Mobile (for CE5 and WM6) It’s ’static’ because it analyzes source code without actually executing it, unlike dynamic analysis tools like Purify. PREfast performs a similar function to lint although people who use both sometimes find that the two tools uncover different defects. PREfast can be found in the folder %_WINCEROOT\PUBLIC\COMMON\OAK\bin\i386\prefast\scripts.

One directory level up from the tool itself is a filter batch file that defines the PREFAST_DEFECT_FILTER environment variable that filters which warnings will be reported. To run PREfast open a Build window and enter the command ‘prefast build -c’. When the build is complete, you can navigate back to the prefast directory and type ‘prefast view’ to see the list of defects in a graphical UI, or ‘prefast list’ to export them to a text file.

There is also a similar tool for analyzing managed code called PREsharp.

As of Platform Builder for Windows CE 6.0, the tool is not actually included as a separate component, but it is incorporated into the compiler. To enable PREfast-like analysis in these environments set CODE_ANALYSIS=1 in your project settings.

If Platform Builder Expires

Saturday, January 24th, 2009

Platform Builder for Windows CE/Windows Mobile 5.0 & 6.0 expires after 180 days. Rather than reinstalling the whole thing every time, there is a workaround.

PB knows when to expire based on the time stamp of the file Etkremov.inf. For WINCE 5, and both WM5 and WM6, this is located here:

C:\Program Files\Windows CE Platform Builder\5.00\EtkRemov.inf

For WM6, it’s located here:

C:\Program Files\Microsoft Platform Builder\6.00\EtkRemov.inf

Delete this file, and then create an empty text file of the same name in the same directory. Don’t bother wasting time re-installing! That takes hours.

Control Panel Changes (SP)

Friday, January 16th, 2009

I was surprised to discover that Smartphone has a completely different scheme for implementing their control panel.   Configuration Manager, the entity that  can accept over-the-air device configuration requests, can also accept requests from the Control Panel Engine.  Transactions between the Control Panel Engine and the Settings UI are performed with XML queries, and the resultant XML file is sent back to Configuration Manager and the request is  routed to the appropriate Configuration Service Provider to be serviced.  So adding a new item to the Settings menu on Smartphone is a little more esoteric, since it’s not documented in the SDK.