Export (0) Print
Expand All
Expand Minimize

What's New in Windows CE 4.2

 

Mike Hall
Microsoft Corporation

Steve Maillet
Entelechy Consulting

May 28, 2003

Summary: Looks at what's new in the recently released Windows CE .NET 4.2 (aka McKendric), updates last month's article with a how-to for developers using the Platform Builder/Emulator, and takes file sharing for a spin (a new feature in Windows CE .NET 4.2). (6 printed pages)


Let's get started this month by answering a question that several of you mailed in about from last month's article. (It's good to know that we have some readers out there.) Several of you have downloaded the Windows CE .NET Emulation Edition and have tried and have failed to deploy the C# application to the emulator. The Emulation Edition is great for building and testing Microsoft® Windows® CE operating system images without having or needing "real" hardware. Unfortunately, last month's article was written assuming that the reader would be using a hardware reference board.

You have two options for testing out managed Windows CE applications from Microsoft® Visual Studio® .NET 2003. The first is to use the emulator that ships with Visual Studio. This is useful for testing out applications that don't need a custom operating system image. The second option is to run your application on an operating system that has been created by the Windows CE .NET development tool, Platform Builder.

Let's assume that you want to use a custom operating system image. Let's further assume that you have included the core operating system components needed to support Microsoft® .NET Compact Framework application development. (See last month's article to get a listing of the components needed to support the .NET Compact Framework.) We can now look at how to use the Windows CE .NET Emulator, and a custom operating system image.

Just as an aside, in last month's article we created a catalog component (.CEC) that wrapped up the core components needed to support .NET Compact Framework development. This included WCELOAD, the component needed to unpack/install CAB files onto a device. The SYSGEN variable needed to add this component (working in Windows CE .NET 4.1) was __SYSGEN_WCELOAD. A search of the Windows CE .NET 4.1 catalog wouldn't find the WCELOAD component, so you needed to add the SYSGEN by hand. This has changed for Windows CE .NET 4.2. You can search the catalog for WCELOAD, and this will locate the component in the catalog. The SYSGEN for this component has changed for Windows to SYSGEN_WCELOAD.

In fact, there are three changes to the Windows CE .NET 4.2 catalog that are interesting for .NET Compact Framework developers. Firstly, there's a new "OS Dependencies for .NET Compact Framework 1.0" component, which wraps up all of the required operating system components (except for SYSGEN_WCELOAD). Secondly, there's a component for "Smart Device Authentication Utility." Thirdly, the SYSGEN_WCELOAD is now a visible component in the catalog.

Okay, but how do we get the Smart Device Authentication and application deployment working with our custom operating system running in the emulator?

Platform Builder provides two Ethernet options for the emulator: NAT, and Virtual Switch. We can change the download options in Platform Builder through the Target, Configure Remote Connection menu, then configure the download service to set the appropriate option. The default option is NAT, which provides outbound connections from the emulator (that is, Internet browsing).

SDAuthUtilDevice.exe requires an inbound connection to the device, which in this case is the emulator. NAT Outgoing Only allows the emulator to browse out to other devices (ideal for testing out the Microsoft® Internet Explorer application). Virtual Switch provides inbound support, ideal if you're testing out XML Web services, or the HTTPD Web Server—in which case we can also use the Virtual Switch to run the Visual Studio Smart Device Authentication Utilities, known as SDAuthUtilDevice.exe.

You may find it useful to add the HTTPD Web Server to your emulation image—if you want to determine whether the Virtual Switch is working or not. Once the emulator image has booted, take a look at the networking icon (bottom right of the Explorer shell). Double-click the icon, which will give you the IP address of the emulator. If the IP address is similar to your desktop PC, then you are probably in good shape. You can also try pinging the emulators IP address from your desktop PC, or browsing to the IP address of the emulator using Internet Explorer (assuming you've added the HTTPD Web server). With Virtual Switch enabled, you should now be in good shape to deploy your C# application from Visual Studio .NET 2003 following the instructions from last month's article.

Since we've already mentioned Windows CE .NET 4.2 in this article, you're probably wondering what's new, where you can get your hands on a copy, and more importantly, whether last months C# Cool Tools sample works on 4.2. The good news is that the one line of code still works without modification <Grin>.

To get a listing of what's new, cool, and interesting with Windows CE .NET 4.2, go take a look at the What's New page. Note that the emulation edition can be downloaded right now—see the link at the top of this article. The release of Windows CE .NET 4.2 was announced at Embedded Systems West in San Francisco April 23-25. This was an interesting event. We were running hands-on labs on the Microsoft booth covering Windows CE .NET, Windows CE .NET Real-Time, Windows XP Embedded, and the Compact Framework. Every lab was totally full; in some cases it looked like there may be fights for some of the seats. There were also a number of interesting devices on the booth in the "device alley." This included an Exertris exercise bike running Windows XP Embedded, and a cute Maron-1 security robot from Japan running Windows CE. I guess this is where Hello Kitty meets the Terminator.

Not only have we released Windows CE .NET 4.2, at WinHEC 2003 we also announced a new pricing structure for Windows CE .NET 4.2 runtime licenses. What a busy month!

Here's a sample of some of the highlights for the release of Windows CE .NET 4.2:

  • .NET Compact Framework 1.0 and Microsoft® eMbedded Visual C++® 4.0 SP2.
  • New Platform Wizard configurations, including Digital Media Receiver, Enterprise Terminal, Residential Gateway, and Voice over IP (VoIP) Phone.
  • Improved Windows CE .NET Test Kit (CETK) features and a new Modular Stress Test for the CETK.
  • Board support packages (BSPs) for two new standard development boards (SDBs): Samsung SMDK2410 hardware platform, based on the S3C2410X01 CPU (ARM920T core), and NEC Solution Gear 2 (SG2) series platform, based on MIPS CPUs.
  • New drivers, including Flash Media, Human Interface Device (HID) Client, and Unified Keyboard.
  • Microsoft Internet Explorer for Windows CE now includes Internet Explorer 6.0 features, Multiple Language (MLANG) support, and more cascading style sheets (CSSs).
  • Four prequalified Bluetooth profiles: Dial-up Networking Profile, LAN Access Profile, Object Push Profile, and File Transfer Profile.

One of the cool features that I know some of you have been asking about for some time is having a file server running on Windows CE .NET. You will extremely happy to know that with the release of Windows CE .NET 4.2, you now have File and Print server support in the operating system.

I thought it would be interesting to show how easy it is to configure an operating system image that shares pictures from a folder within a Windows CE .NET 4.2 device.

There are a number of steps involved in sharing out a folder on the device. The first step is, of course, to have a folder to share. I'm basing my operating system image on the "Internet Appliance" platform configuration, and in this case using the Emulator to share my files.

We use .DAT files to create folders and to copy files from the \windows folder to other folders on our device. (Note that all files created in a Windows CE operating system image are placed by default in the \windows folder.) So, let's create a \Pics folder on the device and copy the default image windowsce.bmp to the \Pics folder. Here's what I need to add to my Project.dat file to make this happen:

root:-Directory("\"):-Directory("Pics")
Directory("\Pics"):-File("windowsce.bmp","\windows\windowsce.bmp")

You may have tried to copy an executable from the \Windows folder to another folder of a device using the method above, and it probably failed. You will need to move the .EXE from the MODULES section of your .BIB file to the FILES section. Everything should then work just fine.

We also need to add some registry keys to the Project.reg file. If you take a look at the Windows CE .NET documentation, you will notice that there are a number of SMB Server registry settings. Most of these can be left as the default setting. The only key we need to add is the network Adapter List. The emulator ships with a driver for the Intel/DEC 2114x, and the adapter name is DC211401. We can see the adapter name from a running operating system image—Start, Settings | network and dial up connections, or through Platform.reg.

[HKEY_LOCAL_MACHINE\Services\SMBServer]
"AdapterList"="DC211401"

We have the ability to set a list of users for the share, using the UserList key.

[HKEY_LOCAL_MACHINE\Services\SMBServer\Shares\Pictures]
"UserList"="Mike,George,Bob"

Alternatively, you may want to have the device wide open. To allow anyone access to the share, you can also set the "NoSecurity" flag to 1.

[HKEY_LOCAL_MACHINE\Services\SMBServer\Shares]
"NoSecurity"=dword:1

I then need to set the name of the share as it is seen by other devices on the network, and the location of the share within the file system of the device. The share name will be "Pictures", and the folder we created was "\Pics". Note that "Type 0" is for files, and "Type 1" is for printers.

[HKEY_LOCAL_MACHINE\Services\SMBServer\Shares\Pictures]
"Type"=dword:0
"Path"="\\Pics"

And then finally I need to give my device a unique name on the network so that networking services can get started. There are two ways to set the username. The first is at run time, by changing the user name through the control panel. The second way is through the registry. Here are the registry keys to have a device boot onto the network with the name of "FooBar" (by default all devices boot with the device name of WindowsCE).

[HKEY_LOCAL_MACHINE\Ident]
    "Name"="FooBar"
   "OrigName"="WindowsCE"
    "Desc"="Sample File Share Demo"

Okay, we're all set. We need to ensure that the emulator image is going to boot with Virtual Switch enabled for the download and debug service. We won't be able to see our share if we select "Nat Outgoing Only."

And here's the end result, I can see the "Foobar\pictures" share from my desktop PC in exactly the same way as if the folder is shared from another Windows XP desktop PC. Pretty cool, eh?

Figure 1. The shared folder on the Windows CE .NET device

Next month we plan on looking at componentization within Windows CE. That was going to be this month's article, but with the release of Windows CE .NET 4.2, and having sessions and labs to build and deliver at ESC West and WinHEC, I've been busier than a one-toothed man at a corn on the cob eating contest. (Thanks to Jon Fincher from the Windows XP Embedded team for the loan of the phrase.)

 

Get Embedded

Mike Hall is a Product Manager in the Microsoft Embedded and Appliance Platform Group (EAPG). Mike has been working with Windows CE since 1996—in developer support, Embedded System Engineering, and the Embedded product group. When not at the office, Mike can be found with his family, working on Skunk projects, or riding a Honda ST1100.

Steve Maillet is the Founder and Senior Consultant for Entelechy Consulting. Steve has provided training and has developed Windows CE solutions for clients since 1997, when CE was first introduced. Steve is a frequent contributor to the Microsoft Windows CE development newsgroups. When he's not at his computer burning up the keys, Steve can be found jumping out of airplanes at the nearest drop zone.

Show:
© 2014 Microsoft