Friday 26 September 2008

Task Manager for Windows Mobile

Hi Folks,

if you're looking for some task manager functionality on Windows Mobile, you have some options.
You can achieve this by using of the "EnumWindows" api function, which enunerates top-level windows. Another option is using of the Toolhelp API (CreateToolhelp32Snapshot / Process32First / Process32Next) functions which enumerate the processes in the system.

A good sample is available at: http://www.codeproject.com/KB/mobile/MobileTaskManager.aspx
Read more! Post this to a friend!

Thursday 25 September 2008

Debugging of native applications with WinCE 5.0 Platform Builder

Hi Folks,

I ran into a problem this week with debugging of Windows CE 5.0 application. I built a simple C++ "Hello world" application wtih eMbedded Visual C++ 4.0. The application works well, I could set breakpoints and debug with Platform Builder 5.0 -> expected behaviour. I took the same source code, built it with Visual Studio 2005 and tried to debug. The application still works, but my breakpoints were ignored by the PB.

When you use the Microsoft Windows CE Platform Builder 5.0 debugger to debug a C++ application that was developed by using Microsoft Visual Studio 2005, you cannot set a breakpoint in the source code window.
The Platform Builder 5.0 debugger cannot interpret the debug information generated by Visual Studio 2005, if you havn't installed any Windows CE 5.0 QFEs.
This is a "known" problem, described by the knowledge base article KB904253 and already fixed by a QFE.

This problem shows how important is the installation of the latest QFEs just to keep your Windows CE environment up to date!
Read more! Post this to a friend!

Tuesday 23 September 2008

Don't miss it!

Hi Folks,

MS is hosting a live chat about Windows Embedded CE and Windows Mobile. This is a great opportunity to chat with some members of the Windows CE development team and allow us to communicate with MS and ask questions about development issues.
So don't forget to put the date in your schedule and join it.

Title: Windows Embedded CE and Windows Mobile Live Chat
Date: Tuesday, September 30, 2008 9:00 - 10:00 A.M. Pacific time
Link: http://msdn.microsoft.com/en-us/chats/default.aspx

Have fun and enjoy!
Read more! Post this to a friend!

Wednesday 17 September 2008

(Un)Fortunately, memory card are constantly growing in size

SD Cards larger than 2GB are SDHC cards now. Your multicard reader and older Windows CE don't like this SDHC cards. You have to change your driver. And it's very easy to do:

* Install all QFEs from 2007 or R2 for CE 6.0
* Set the environment variable IMGSDBUS2 to 1
* Add support for response type R7 to your SD driver
(Add "case ResponseR7:" just behind "case ResponseR6:", that's all!)

Refer http://support.microsoft.com/kb/933809 for a detailed description
or for CE 6.0 R2 http://msdn.microsoft.com/en-us/library/bb905598.aspx

At this point you may do some tests with a couple of SD-Cards.
As expected some cards work fine but some do NOT!
After debugging around I found the weak point in the initialization.
That's what you should do: Send CMD0, CMD8, ACMD41 and CMD2.
But the SDBus2 driver does an extra loop:
Send CMD0, CMD8, ACMD41, CMD0(IDLE), CMD8, ACMD41(READY) and CMD2.
And the 2nd ACMD41 will fail on some SD-Cards.
The card doesn't "like" the state change back to IDLE and again to READY.
I tried all kinds of additional sleeps without success.
But when I skipped the back-to-IDLE part the card works fine.

If you find any other non-functioning SDHC-Card on the market, just mail it to me.

Tschüß Holger
Read more! Post this to a friend!

Windows CE QFEs for month of August 2008 arrived

Hi Folks,
the latest Windows CE updates have been recently released and are available for download. Some critical issues have been resolved so get them now! More information for each update is provided in the Readme document available after the individual update(s) has been installed.

Windows CE .NET 4.2 Platform Builder Monthly Update (August 2008)
Download link: http://www.microsoft.com/downloads/details.aspx?FamilyId=80B3D0D9-3A62-4372-98F3-7B041B929A61&displaylang=en
Description: This is a set of updates for Windows CE .NET 4.2 Platform Builder released during the period of August 1 - August 31, 2008. These updates are fixes for Windows CE operating system problems you run into during the development and maintenance of your custom platform.
It contains IE component updates.

Windows CE 5.0 Platform Builder Monthly Update (August 2008)
Download link: http://www.microsoft.com/downloads/details.aspx?FamilyId=806A9801-2E55-4C65-B3B7-3A9F9107BD97&displaylang=en
Description: This is a set of updates for Windows CE .NET 5.0 Platform Builder released during the period of August 1 - August 31, 2008. These updates are fixes for Windows CE operating system problems you run into during the development and maintenance of your custom platform.
It contains the following updates:
Component: IE
080804_KB955789 - This update addresses a number of Internet Explorer issues.

Component: NK
080826_KB955855 - Cache is not flushed when the memory of installable ISR is released back to the memory pool. As a result, the physical memory pool may get corrupted.

Component: Redir
080827_KB956346 - Redir component may not always use Server Local time for file modification timestamp.

Windows Embedded CE 6.0 Monthly Update (August 2008)
Download link: http://www.microsoft.com/downloads/details.aspx?FamilyId=03FC9EA0-21C9-49E0-9CB8-1FA03900EE32&displaylang=en
Description: This is a set of updates for Windows CE .NET 6.0 Platform Builder released during the period of August 1 - August 31, 2008. These updates are fixes for Windows CE operating system problems you run into during the development and maintenance of your custom platform.
It contains some critical updates:
Component: DirectX
080805_KB956191 - Two flags DDBLT_WAITNOTBUSY and DDBLT_WAITVSYNC may not be passed to the driver preventing them from being usable.

Component: Filesys
080825_KB956503 - Paths passed to the root file system filter stack by FSDMGR are not always fully canonical (don't always begin with a \ character). This may cause a problem in the file replication filter.

Component: IE
080804_KB955788 - This update addresses a number of Internet Explorer issues.

Component: LDAP
080805_KB955251 - Chase referrals in the form of domain names may not get converted to fully qualified host names.

Component: RDP
080815_KB955376 - This update will allow customization of the RDP UI to fit in QVGA.
Read more! Post this to a friend!

Tuesday 16 September 2008

ARM “by-value” compiler bug

Hi Folks,

newly we've rediscoverd an already "known" compiler bug while developing Windows CE 5.0 applications with eMbedded Visual C++ 4 (SP4) for the ARM processor. But maybe it is still important to some developer to talk about it.

The C++ ARM compiler creates buggy code when passing structs and classes per value and when the struct or class stores pointers to itself or its members somewhere.

Code Example:

class A{
public:
A (): m_OrigThis(NULL) { }
A (A& a): m_OrigThis(this) { }
A* m_OrigThis;
};

void foo (A a2)
{
ASSERT(a2.m_OrigThis == &a2); // unequal on ARM
}

int WINAPI WinMain( .... )
{
A a;
foo (a);
return 0;
}


You can avoid this bug by switching your development environment from eMbedded Visual Tools 4 to VC2005.
Then the VS2005 ARM compiler creates correct code, if the struct or class contains the copy constructor. In VS2008 the ARM compiler works well also.
If you're developing for Windows CE 4.x you must use eMbedded Visual Tools 4, in this case you have to "rewrite" your code.
If you're looking for some more stuff about Windows CE ARM compiler, then take a look at the following links:
http://msdn.microsoft.com/en-us/library/ms933779.aspx
http://msdn.microsoft.com/en-us/library/ms863626.aspx
Read more! Post this to a friend!

Friday 12 September 2008

Windows Embedded CE 6.0 and Platform SDK

You might be aware that you need a Platform SDK when developing native applications for Windows CE. Up until Windows CE 5.0 there was the Standard SDK which you could use in case you did not have a Custom Platform SDK from the board developer. You might have noticed that with Windows Embedded CE 6.0 the Standard SDK vanished so now you do need a Custom Platform SDK inevitably.

You might think it is a disadvantage not having the Standard SDK anymore, but now you can be sure that when your application links it will run on the specific platform.

Have fun!
Read more! Post this to a friend!

Thursday 11 September 2008

Windows Embedded CE 6.0 R2 and VoIP

R2 of Windows Embedded CE 6.0 comes with a completely rebuilt VoIP application suite consisting of the Homescreen Application, the Phone Application, the Settings Application and the Bootstrap Application. It can be found under _WINCEROOT\PUBLIC\FP_VOIP. The old VoIP solution which was introduced with Windows CE 4.2 is still available under _WINCEROOT\PUBLIC\VOIP.

The new VoIP application suite is available both in landscape and portrait mode. The source code is the same for both versions; they only differ in the resource files.

Why am I telling you this you might ask? This information is already available on the net! Well I want to give you a few hints on how to configure this exciting and new VoIP suite:

Once you have R2 installed and you want to use the new VoIP suite you simply have to set up a new OSDesign using the VoIP OSDesign Template. By default this uses the landscape version and excludes the Bootstrap Application but you can easily change this after setting up your OSDesign.

After building, your platform will start-up into the Homescreen Application of the new VoIP suite. You might notice that you don’t have any possibility to configure the phone lines. To do so, you have to start the Settings Application manually: call phsettings from the devices command prompt or start the Settings Application from Platform Builder. Now you can apply the SIP server settings on a per line basis (there are up to 5 individual lines) under: System Settings->Line Configuration->Line <#>. To configure the chosen line, press the Edit button. Enter the administrator pin. The default Administrator pin is 112233 and is defined in _WINCEROOT\PUBLIC\FP_VOIP\OAK\PHONE\RESOUCES\strings.rc (IDS_DEFAULT_ADMIN_PIN). Please note that this pin differs from the pin that can be set from the Homescreen Application when selecting the Lock button!

Now you should be all set to get the VoIP connection working.

Have fun!
Read more! Post this to a friend!

Tuesday 9 September 2008

Canalys Navigation Forum - Budapest

So here I am, sitting in Budapest at the Canalys Navigation Forum.

One of the keynote presentations today was held by Ilya Bukshteyn, Sen. Director of Windows Embedded Marketing Group. The keynote was supposed to of been held by Kevin Dallas, who unfortunately was not able to make the event - Get well soon Kevin.
The presentation, which covered Microsofts vision of connected, service oriented devices also included a NavReady demo from Olivier Bloch. If you read his post about the keynote rehearsal, then this is where the story continues:

Olivier doing last minute preps:



And Ilya in action:



One of the announcements made during the presentation is that Mio will be building its next-generation PNDs on NavReady.



And if that wasn't enough MSFT also gave away a 4GB SD memory card loaded with Windows Embedded information as well as a copy of the Windows Embedded CE 6.0 Fundamentals book - that is if the books get out of customs in time!

So long and thanks for all the fish!

Read more! Post this to a friend!

Friday 5 September 2008

Strange build error message

Have you ever seen the following error in the build window

CEFilter error. Missing "@CESYSGEN IF" statement(s) detected

and then been looking around where this comes from?
This week I got a BSP and - what wonder - immediately built an image. The strange thing was: nk.bin was created successfully but I always got the abovementioned error message!

First, I started counting the "CESYSGEN IF" and "CESYSGEN ENDIF" statements in ce.bib, reginit.ini, initobj.dat. Everything seemed to be fine.
Then I found a post here web. (thanks for the solution, "Treadstone").

So, do not forget to search also the dirs files for unmatched CESYSGEN IF/ENDIF statements.

Read more! Post this to a friend!

"Spacy" batch file tweak

The following code line prints spaces to the output file

ECHO foo=bar > file.txt

Apart that this is not very esthetic, in some cases it is not what you want. But there is a workaround. Just add an additional redirection like this

ECHO foo=bar<NUL: > file.txt

and you'll get rid of it.
Read more! Post this to a friend!

Thursday 4 September 2008

Wonna know if your .dll or .exe is Windows Embedded CE 6.0 compatible?

So you have a Windows CE 5.0 (or older) .dll or .exe and you want to know if it uses APIs that are no longer supported in Windows Embedded CE 6.0? No problem! Just run the Application Compatibility Tool on your developoment workstation:
ceappcompat -i [folder name / dll name / exe name] -o [output file name]
This application is installed in the %_WINCEROOT%\Public\Common\OAK\Bin\i386 directory. You can find more information in the Platform Builder help. Just look for "Application Compatibility Tool"

Have fun!
Read more! Post this to a friend!

Monday 1 September 2008

BSP Template for CE 6.0 / CE6R2

Hi Folks,

you're looking for some introduction stuff on BSP development? Well, then I have a hint for you. You can find a Board Support Package (BSP) template for CE 6.0 / CE6R2 on the Microsoft CE Base Team blog.

This BSP template is great stuff and serves the following purposes:

  • Provide a stub version of a BSP that illustrates all required and optional BSP functions.

  • Get the basics of Windows CE BSPs development -> very useful to newbies

  • Additional documentation source

You can find and download the BSP template here:
http://blogs.msdn.com/ce_base/archive/2008/05/30/bsp-template-now-available-for-ce-6-0-ce6r2.aspx


Read more! Post this to a friend!