Creating an OS Design containing VoIP in CE R2

If you try to sysgen a Windows CE R2 OS Design that contains the VoIP components you'll encounter an "error in sysgen phase" when sysgenning FP_VOIP. Build.log will show the error occurred when trying to link phsettings.exe:

phsettings.exe : fatal error LNK1120: 4 unresolved externals

The reason for this is an error in the "sources." file of \WINCE600\PUBLIC\FP_VOIP\OAK\PHONE\COMMON\UTILS:

SSOURCES= \
    DisplayItem.cpp      \
    GDICache.cpp         \
    LogoScreen.cpp       \
    LineHelper.cpp       \
    NetworkUtils.cpp     \
    PaintHelper.cpp      \
    Poom.cpp             \
    RingtoneIterator.cpp \
    SecurityUtils.cpp  

\
    SystemTimeUtils.cpp  \
    Timers.cpp           \
    TimeUtilities.cpp

No files after SecurityUtils.cpp will be built because of the extra return (actually a couple of funny characters messing up the build parser). The shipped libraries were built using this faulty "sources." file, hence the unresolved external symbols when phsettings links to voip_common.lib.

What I'm going to tell you now is against all my beliefs: To (quickly) fix this, you'll have to modify some files in the PUBLIC tree (did I really say that?!)... Well, at least until Microsoft releases the QFE (I've opened a support incident with Microsoft and they are working on fixing this bug at this very moment).

First copy \WINCE600\PUBLIC\FP_VOIP to \WINCE600\ORG_PUBLIC_FP_VOIP (so that you can restore the original FP_VOIP folder when Microsoft releases the QFE).

Now change the "sources." file in \WINCE600\PUBLIC\FP_VOIP\OAK\PHONE\COMMON\UTILS to match this:

!if 0
Copyright (c) Microsoft Corporation.  All rights reserved.
!endif
!if 0
Use of this sample source code is subject to the terms of the Microsoft
license agreement under which you licensed this sample source code. If
you did not accept the terms of the license agreement, you are not
authorized to use this sample source code. For the terms of the license,
please see the license agreement between you and Microsoft or, if applicable,
see the LICENSE.RTF on your install media or the root of your tools installation.
THE SAMPLE SOURCE CODE IS PROVIDED "AS IS", WITH NO WARRANTIES.
!endif

TARGETNAME=voip_common
TARGETTYPE=LIBRARY
RELEASETYPE=OAK
WINCEOEM=1

WINCEATL80=1

INCLUDES=\
    ..\inc; \
    ..\..\inc; \
    $(_PUBLICROOT)\wceappsfe\sdk\inc; \
    ..\ResourceUtils; \
    $(_PUBLICROOT)\common\ddk\inc;

SOURCES= \
    DisplayItem.cpp      \
    GDICache.cpp         \
    LogoScreen.cpp       \
    LineHelper.cpp       \
    NetworkUtils.cpp     \
    PaintHelper.cpp      \
    Poom.cpp             \
    RingtoneIterator.cpp \
    SecurityUtils.cpp    \
    SystemTimeUtils.cpp  \
    Timers.cpp           \
    TimeUtilities.cpp    

Once you've done this, browse to PUBLIC\FP_VOIP in the Solution Explorer (in Visual Studio 2005 with your OS Design open), right click on FP_VOIP and choose "Rebuild" from the context menu. After the rebuild has completed you can sysgen your OS Design successfully.

Unfortunately when you run your kernel you will encounter some more bugs in FP_VOIP... When you add the portrait resources the settings application (phsettings.exe) won't start because it can't find the correct menu structure (breaks at networkdnssettings.cpp line 330 (function NetworkDNSSettingsDialog_t::CreateSpinnerDisplayItem) and when you add the landscape resources the settings application will run correctly, but the homescreen application won't show any text on the buttons (and the buttons don't work).

So, the out-of-the-box applications don't work as expected, but again, Microsoft will release a QFE fixing these issues soon. In the meantime you can play around with it (just make sure you select the landscape resources) by manually starting phsettings.exe so you can setup VoIP. You can even make a phone call (wow! ;), but you'll have to manually start the correct applications.

Seems like this R2 VOIP stuff was never really tested...