Click here to learn
about this Sponsor:
Home  |  News  |  Articles  |  Polls  |  Forum  |  Directory

Keywords: Match:
Working with re-factored components in Windows XPe FP2007
by Lynda Allen (Dec. 21, 2006)

Foreword: Windows XP Embedded team member Lynda Allen takes a detailed look at reducing XPe's footprint by taking advantage of the re-factored components in Feature Pack 2007. There are several ways to go about it, resulting in varying degrees of reduction, depending on how much effort you're willing to invest.



Working with Re-factored Components in Windows XPe FP2007

by Lynda Allen

As part of the componentization changes we made to XPe for Feature Pack 2007, various components were re-factored into multiple, smaller and more granular components. The benefit of this is footprint savings. Components that, in the past, depended on one or two files owned by e.g. the Internet Explorer component had to take the footprint hit of the whole of Internet Explorer in order to use these files. But in FP2007 they do not have to take the same footprint hit.

By creating separate components to own these files the feature that depended on IE can now just depend on the new component in order to bring those files into the runtime and function correctly. This can lead to smaller overall footprint, depending on the kind of runtime you are building.

For example, if you look at Outlook Express in SP2 you will see that running check dependencies in Target Designer brings in the full Internet Explorer component (and all its subsequent dependencies) -- see figure 1.


Figure 1

Now in FP 2007 the 3 files that Outlook Express needs in order to function correctly have been pulled out of Internet Explorer (in other words are no longer file resources listed in the Internet Explorer component) and are now "owned" by entirely new components. These new components are "Primitive" components, which mean they have usually only one file resource, any registry keys associated with that file resource, and perhaps an FBA Registration resource.

Figure 2 below shows OE depending on only primitive components and not on IE. Note that IE will also depend on the primitive components that own the files that used to be part of IE – this is so that customers who need the whole of the IE feature are guaranteed to get all the same files in their runtime that they would have in SP2 before the re-factoring, and the IE feature will function as before.


Figure 2

This article will be the first in a series where I will gradually get more and more detailed into how to reap benefits of all the re-factoring work done, depending on how much time and effort you are prepared to invest in tweaking configurations that have been upgraded to FP2007.

Firstly, I must emphasize that in order to get the FULL advantage of this re-factoring work, you should build your configurations from scratch with Feature Pack 2007. This ensures that your dependency check will only bring in the new, smaller components for the features that were re-factored. However, if you choose not to rebuild your configuration there are still other ways that you can tweak your configuration to obtain some footprint benefit from this re-factoring work. In the next articles I will delve into details on how you can do this.

For now, here is a list of components that were re-factored so you can see if any of these are even brought into your configurations through a dependency check (because another component you may have added had a dependency on one of these components), and also the way they are now structured in FP2007:

1. Internet Explorer
Re-factored into: Internet Explorer
  • Primitive: Actxprxy.dll
  • Primitive: Browsewm
  • Primitive: Cryptdlg.dll
  • Primitive: hlink.dll
  • Primitive: iedkcd32.dll
  • Primitive: ieinfo5.ocx
  • Primitive: iexplore.exe
  • Primitive: imgutil.dll
  • Primitive: inetcpl.cpl
  • Primitive: inseng.dll
  • Primitive: jsproxy.dll
  • Primitive: mshta.exe
  • Primitive: msident.dll
  • Primitive: msidntld.dll
  • Primitive: msrating.dll
2. Volume Shadow Copy Service
Re-factored into: Volume Shadow Copy Service
  • Primitive: vssapi.dll
3. Outlook Express
Re-factored into: Outlook Express
  • Primitive: msoert2
  • Primitive: wab32
4. Simple Network Management Protocol (SNMP)
Re-factored into: Simple Network Management Protocol (SNMP)
  • Primitive: snmpapi.dll
5. Windows Firewall/Internet Connection Sharing (ICS)
Re-factored into: Windows Firewall/Internet Connection Sharing (ICS)
  • Primitive: hnetcfg.dll
It may not seem that re-factoring only 5 components would have much of an impact to footprint but there are two aspects to the savings you see here -- one is the that you no longer have the footprint hit of the files owned by that large component and, secondly, you no longer have the footprint hit of all the dependent components the large component would have brought in.

For some users it may not be practical in terms of time and effort to re-create a configuration from scratch with FP 2007. These users may be willing to trade less of a footprint savings for less work to optimize their configuration.

The first step in reducing footprint is to upgrade your SP2 configuration to FP2007, and then simply delete the re-factored components from your configuration if you know that you do not specifically need them (i.e. you did not specifically add them to your configuration when you first created them, but rather they were bought in by a dependency check).

To illustrate the process I am going to use the Internet Explorer component as an example of a re-factored component in my runtime. I have built a Winlogon Sample macro configuration in SP2 and added Outlook Express to it, then run satisfied all dependencies. You can see that Internet Explorer has been brought into the runtime by the dependency check, and that Target Designer estimates the footprint to be 92689 KB/128736 KB (roughly 90MB/125MB).


SP2 configuration
(Click image for larger view)

Now, after installing FP2007 I upgrade that slx, and delete Internet Explorer from it. After running a dependency check you can see that one or more Primitive components have been added, but that IE is no longer brought into the runtime. The footprint estimate is also somewhat lower - 89579 KB/124416 KB (roughly 87MB/121MB).


SP upgrade configuration
(Click image for larger view)

This may be an adequate savings for some customers, but for those customers who want to dig a little deeper to further reduce footprint we can start walking down the dependency chain of the IE component. Just because IE was deleted from the configuration does not mean that any of dependencies it originally brought in (in SP2) are also removed. This chain of dependencies can be where the real footprint hit is noticeable. Admittedly it is not very intuitive in Target Designer to identify a component's dependencies, however there are a few ways of tackling this task:
  1. One way is to add the the component to a blank configuration, turn off auto-resolve dependencies (Tools > Options > Dependency Check > uncheck "auto-resolve dependencies") and run a dependency check. The task pane at the bottom of TD will show you the first level of dependencies that IE has. NOTE: This should be done on an SP2 database in order to identify the original dependencies that IE brought into your original SP2 configuration).

  2. Secondly, you can XPeCMD to list out the dependencies of the SP2 version of the IE component (all versions of a component reside in your database, but only the most recent vesion in visible in Target Designer). Using XPeCMD we can view all versions of the component, and their properties and dependencies. To do this, use XPeCMD to open a connection to your database, find all versions of IE, then selct the SP2 version and view its dependencies. The syntax is as follows:
    • dbopen
    • deptree /2 'comp:^Internet Explorer|R2890'
    (the |Rxxxx after the component name indicates the specific version of the component you want to view - in this case the SP2 version, 2890)

XPeCMD output
(Click image for larger view)

The output from XPeCMD shows that the SP2 version of IE has a number of first-level dependencies. I can now go back and delete all of these first level dependency components from my Winlogon + OE config. After running a check dependency again (to verify that no other component in FP2007 requires any of the components I just deleted) the footprint estimate is now 84850KB/117848KB (roughly 83MB/115MB).

If more footprint savings is required you an walk through the next level of dependencies (i.e the dependencies brought in by the first level dependency components) as far down the chain as you wish to go. Naturally, the further down the chain you go the more effort is involved, until you may come a point where it would be just as easy to rebuild the config from scratch in FP2007.

As a final comparison, I rebuilt my Winlogon + OE config from scratch using FP2007- the size in TD is 77613 KB/107796 KB (roughly 76MB/105MB). You can see it quite a bit smaller than the SP2 configuration.


FP 2007 configuration from scratch
(Click image for larger view)


Copyright (c) 2006 Microsoft Corp. All rights reserved. Reproduced by WindowsForDevices.com with permission. This article was originally published in two parts on the Windows XP Embedded Team Blog, here and here



About the author: Lynda Allen has been a member of Microsoft's Windows XP Embedded Test team for about two years, where her primary responsibility is testing of component integration. This involves ensuring that the components can be deployed on a minimal embedded runtime without any errors, and that the various components "play nicely" together. Lynda is originally from South Africa.



Related stories:

(Click here for further information)


Windows XP for Embedded Applications
This white paper describes the benefits of using Windows XP when developing embedded applications.

A Manager's Guide to Selecting a Mobile Device Operating System
This white paper offers a comparative review of Microsoft Windows CE and Windows Mobile.

Visual Basic 6.0 to .NET Migration
This paper focuses on the methodology and techniques which Infosys (Microsoft Technology Center) has developed for migrating VB 6.0 Applications to .NET. Our approach ensures a smooth, cost effective, and efficient migration.

Mobile Device Security: Securing the Handheld, Securing the Enterprise
This whitepaper identifies security threats to corporate data on mobile devices and details how mobile devices can become a "backdoor" to the enterprise.

Mobile Device Security: The Eight Areas of Risk
It's common knowledge that adding mobile devices to your network increases security risks. There are multiple facets to mobile security, all of which should be paid close attention to. This E-Guide presents a more in depth look into the eight key areas of securing wireless devices.

Quality Assurance and .NET
This paper discusses best practices for functional, regression and load testing of .NET applications.

SCADA Security in Integrated Networks
As businesses leverage their SCADA systems by integrating them into the business networks, they must also assure the security of the SCADA system.

The Advantages of Small Form Factor HMI
HMIs have mutated and changed with new requirements, and they have become more flexible and capable. And while they've been doing that, they've become smaller and more useful.

9 Critical Requirements for Web Application Security
Learn why your Web applications expose dangerous security breaches and what’s required to effectively protect your Web applications and the sensitive information behind them.

 


Got a HOT tip?   please tell us!
Free weekly newsletter
Enter your email...
Click here for a profile of each sponsor:
PLATINUM SPONSORS
(Become a sponsor)

ADVERTISEMENT
(Advertise here)

Updated! The latest Windows-powered...

mobile phones!

other cool
gadgets

HOT TOPICS
Microsoft targets PNDs with new embedded OS
Microsoft tips .NET MF 3.0 highlights
Microsoft previews Windows Embedded Standard
Microsoft offers free Windows CE 6.0 textbook
Microsoft renames embedded operating systems
Microsoft unveils Windows Mobile 6.1
New Atom models target low-cost PCs
REFERENCE GUIDES
Windows Device Showcase
Intro to Windows Embedded
Intro to Shared Source
Real-time Windows Embedded
Windows Embedded books
Join our Windows Embedded discussion forums:
Windows XP Embedded
Windows CE
Windows Mobile


Windows Embedded developer newsgroups
Windows CE
XP Embedded
PocketPC
Smartphone

Microsoft's Windows Embedded resources
Embedded dev center
Mobile dev center
Windows CE tutorials
XP Embedded tutorials
Windows Embedded seminars
Windows Embedded application categories
3rd-party partners


BREAKING NEWS

• Cortex-A8 SBCs target signage and kiosks
• Student competition offers a different kind of fireworks
• Windows CE SBC targets HMI development
• All-you-can-eat carrier launches -- sort of
• Adeneo and IntervalZero promote "soft-control" architecture
• App creates virtual serial ports in Windows CE
• Windows satellite phone service takes off (literally)
• Bsquare and Microsoft renew key distribution agreement
• Software syncs HTC phones with Macs
• Electricity meter runs Windows, talks to Google
• Windows device is two phones in one
• MIcrosoft's online store to debut with 600 Windows Mobile apps
• Windows Mobile gets upgraded Skype VoIP client
• Panel PC targets outdoor use
• Samsung shrinks ARM11 application processor


MOST POPULAR (last 90 days)
• "Netbook" uses Intel's Atom N270
• Windows CE takes on Linux in low-end netbooks
• HTC ups Touch resolution
• Microsoft unleashes new embedded OS
• Windows Mobile phone gets 800 x 480 display
• HTC spins WiMAX phone?
• Smart camera sports Atom
• Dual-core AMD netbook gets rave review
• Windows Mobile 7 "delayed"
• GPS phone uses new Marvell "Tavor" chip
MOST POPULAR (Classics from the vault)
Windows XP Embedded USB boot
Troubleshooting Windows XPe's blue screen "Stop 0x0000007B" error
Asus reveals $190 mini notebook
Windows Mobile 6 SDKs available for download
Windows Mobile VPN client plays with Cisco
HTC adds GPS to Windows Mobile Touch line
Microsoft unveils Windows Mobile 6.1
Guide to HTC's Windows Mobile smartphone platforms
• HTC releases Touch Diamond ROM upgrade
Customizing Windows XP Embedded thin clients

Also visit our sister sites:


Sign up for WindowsForDevices.com's...

news feed

Or, follow us on Twitter...



Home  |  News  |  Articles  |  Polls  |  Forum  |  Directory  |  About  |  Contact
 

Ziff Davis Enterprise Home | Contact Us | Advertise | Link to Us | Reprints | Magazine Subscriptions | Newsletters
Tech RSS Feeds | White Papers | ROI Calculators | Tech Podcasts | Tech Video | VARs | Channel News

Baseline | Careers | Channel Insider | CIO Insight | DesktopLinux | DeviceForge | DevSource | eSeminars |
eWEEK | Enterprise Network Security | LinuxDevices | Linux Watch | Microsoft Watch | Mid-market | Networking | PDF Zone |
Publish | Security IT Hub | Strategic Partner | Web Buyer's Guide | Windows for Devices

Developer Shed | Dev Shed | ASP Free | Dev Articles | Dev Hardware | SEO Chat | Tutorialized | Scripts |
Code Walkers | Web Hosters | Dev Mechanic | Dev Archives | igrep

Use of this site is governed by our Terms of Service and Privacy Policy. Except where otherwise specified, the contents of this site are copyright © 1999-2008 Ziff Davis Enterprise Holdings Inc. All Rights Reserved. Reproduction in whole or in part in any form or medium without express written permission of Ziff Davis Enterprise is prohibited. Windows is a trademark or registered trademark of Microsoft Corporation in the United States and/or other countries and is used by WindowsForDevices under license from owner. All other marks are the property of their respective owners. WindowsForDevices is an independent publication not affiliated with Microsoft Corporation.