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!