Wednesday, 28 October 2009

Active Sync problems using RNDIS

I use a number of machine on a day to day basis, one of my development machines refuses to connect using Vista's Active Sync (Windows Mobile Device Center) to any devices using RNDIS as the connection type. The RNDIS connection is made but the device center refuses to attempt any connection... ger!

Connecting using USB serial works without any problems, so here is my work around until I find a fix:

If you are using Windows Mobile Standard (Smartphone) then you can switch to using USB Serial from the default that is RNDIS by going to settings->connections->USB to PC and un-selecting the "Enable advanced network functionality". This resorts to using the old fashioned USB serial. There should be a similar setting on Windows Mobile Professional (PocketPC).

Wednesday, 21 October 2009

Lightweight XML User interface for Windows CE

ByteSnap Design have just launched their user interface SnapUI, this UI engine uses XML to separate the graphics engine from the user interface configuration.

The XML file describes the whole screen menu structure and icon layout, any text placement, language and interaction, whilst the engine is responsible for rendering this configuration to the user and interfacing with any propriety hardware on the embedded system

The tool is aimed at embedded devices using Windows CE but can be run using the same graphics files on a Desktop PC for quick development, testing, demos etc, read more from the article on WindowsForDevices SnapUI

Bytesnap Design Ltd are a UK based company near Birmingham, read more about the SnapUI and design services at www.bytesnap.co.uk

Wednesday, 14 October 2009

Using WinCE APIs From Kernel OEM Routines

There are many occasions where you want to implement some functionality in a Kernel IOCTL or OEM kernel callback but you can't call the normal Windows CE API because you're in kernel space. So tasks such as setting or reading registry entries, creating events and signalling processes etc can't be done... or can they..?

Some of the basic API functions for this support are available but the functions have a prefix NK or K, for instance:

NKSleep()

NKRegCloseKey()
NKRegCreateKeyExW()
NKRegOpenKeyExW()
etc

Note that not all of these are documented, so for more information see:
\WINCE600\PUBLIC\COMMON\OAK\INC\nkexport.h

More advanced functions are available in:

\WINCE600\PRIVATE\WINCEOS\COREOS\NK\INC\syncobj.h

This is the publicly available Windows CE private kernel code, and includes event, Semaphores and even message queues!:

NKSetEvent
NKPulseEvent
NKResetEvent
NKCreateMsgQueue
etc!
So don't use flags and share memory, do it properly with some thread and process intercommunication! :)