Professional Microsoft ® Windows ® Embedded CE 6.0 www.wrox.com $59.99 USA $65.99 CAN Wrox Professional guides are planned and written by working programmers to meet the real-world needs of programmers, developers, and IT professionals. Focused and relevant, they address the issues technology professionals face every day. They provide examples, practical solutions, and expert education in new technologies, all designed to help programmers do a better job. Recommended Computer Book Categories Programming Software Development ISBN: 978-0-470-37733-8 With its support for multiple processor architectures, Windows Embedded CE can be adapted to a variety of devices, including Smartphones, PocketPCs, digital cameras, DVRs, VoIP, network routers, wireless projectors, robotics, data acquisition, human-machine interfaces, and more. Packed with straightforward exercises and helpful examples, this book is aimed at demonstrating how to perform various development tasks in the Windows Embedded CE 6.0 environment. You’ll quickly come to view Windows Embedded CE 6.0 as an ideal operating system for developing a new generation of intelligent, multimedia, connected, and service-oriented embedded devices. Author and Embedded CE expert Samuel Phung encourages you to develop Windows Embedded CE 6.0 applications by adapting the skills you already have. You’ll learn to produce a new breed of intriguing embedded devices and you’ll come to understand ways in which the Windows Embedded CE environment is efficient, developer-friendly, and easy to master. What you will learn from this book ● How to build a customized CE 6.0 runtime image ● Various forms of debugging and the array of debugging tools ● Ways to develop managed-code and native-code applications for Windows Embedded CE using Visual Studio Enhance Your Knowledge Advance Your Career ● Techniques for deploying a Windows Embedded CE 6.0 device with BIOS Loader ● Methods available to autolaunch an application when CE starts ● How to create thin-client applications using the provided design templates ● Ways to customize the user interface when CE starts and replace the standard Explorer shell Who this book is for This book is for developers who are interested in learning what resources are available as part of the Windows Embedded CE tool chains and how to use them. A basic understanding of Visual C++, C#, or Visual Basic is helpful. Microsoft ® Windows ® Embedded CE 6.0 Phung Professional subtitle spine=.96" Updates, source code, and Wrox technical support at www.wrox.com Professional Microsoft ® Windows ® Embedded CE 6.0 Samuel Phung Wrox Programmer to Programmer TM Wrox Programmer to Programmer TM www.it-ebooks.info Professional Microsoft ® Windows ® Embedded CE 6.0 Enhance Your Knowledge Advance Your Career Professional Microsoft Windows Embedded CE 6.0 978-0-470-37733-8 Provides the much needed information resources to help developers save time and gain critical knowledge quickly to take advantage of the Rapid-Application-Development environment provided by Windows Embedded CE. This book reveals how different pieces of Windows Embedded CE components come together to help programmers develop and build devices. Professional C# 2008 978-0-470-19137-8 Updated for .NET 3.5 and Visual Studio ® 2008, this book is the ultimate guide to C# 2008 and its environment. The team of superlative authors explains why the C# language cannot be viewed in isolation, but rather must be considered in parallel with the .NET Framework. Professional Visual Basic 2008 978-0-470-19136-1 This book shows developers exactly how to build everything from traditional console applications, ASP.NET applications, and XML Web Services. Along with these various applications, this book deals with the issues of security, data access (ADO.NET), and the latest Visual Studio .NET IDE, as well as introducing developers to the new .NET 3.5 Framework. Professional C++ 978-0-764-57484-9 Discover how to write cross-language and cross-platform code, how to perform unit testing and regression testing, and how to use the standard C++ library and arm yourself with a wealth of reusable coding patterns that can be applied to all your projects. Get more out of WROX.com Programmer to Programmer ™ Interact Take an active role online by participating in our P2P forums Wrox Online Library Hundreds of our books are available online through Books24x7.com Wrox Blox Download short informational pieces and code to keep you up to date and out of trouble! Chapters on Demand Purchase individual book chapters in pdf format Join the Community Sign up for our free monthly newsletter at newsletter.wrox.com Browse Ready for more Wrox? We have books and e-books available on .NET, SQL Server, Java, XML, Visual Basic, C#/ C++, and much more! Contact Us. We always like to get feedback from our readers. Have a book idea? Need community support? Let us know by e-mailing wrox-partnerwithus@wrox.com spine=.96" www.it-ebooks.info Professional Windows® Embedded CE 6.0 Introduction xxi Chapter 1: Windows Embedded CE 1 Chapter 2: Development Environment and Tools 15 Chapter 3: Board Support Package 39 Chapter 4: Building a Customized CE 6.0 Runtime Image 61 Chapter 5: Connecting to Target Device 85 Chapter 6: Debugging and Debugging Tools 113 Chapter 7: Boot Loader Overview 149 Chapter 8: The Registry 163 Chapter 9: Testing with CETK 177 Chapter 10: Application Development 197 Chapter 11: Visual C# 2005 Applications 207 Chapter 12: VB 2005 Applications 223 Chapter 13: Native-Code Applications 251 Chapter 14: Autolaunch Applications 273 Chapter 15: Customizing the UI 291 Chapter 16: Thin-Client Applications 307 Chapter 17: Home Automation Applications 327 Chapter 18: RFID Security Access Control Applications 361 Chapter 19: Robotic Applications 371 Chapter 20: Deploying a CE 6.0 Device 397 Appendix A: Windows Embedded CE References 417 Appendix B: Installation and Software 423 Appendix C: Sample Applications and OS Design Projects 427 Index 435 ffirs.indd iffirs.indd i 9/26/08 5:37:44 PM9/26/08 5:37:44 PM www.it-ebooks.info ffirs.indd iiffirs.indd ii 9/26/08 5:37:45 PM9/26/08 5:37:45 PM www.it-ebooks.info Professional Windows® Embedded CE 6.0 ffirs.indd iiiffirs.indd iii 9/26/08 5:37:45 PM9/26/08 5:37:45 PM www.it-ebooks.info ffirs.indd ivffirs.indd iv 9/26/08 5:37:45 PM9/26/08 5:37:45 PM www.it-ebooks.info Wiley Publishing, Inc. Professional Windows® Embedded CE 6.0 Samuel Phung ffirs.indd vffirs.indd v 9/26/08 5:37:45 PM9/26/08 5:37:45 PM www.it-ebooks.info Professional Windows® Embedded CE 6.0 Published by Wiley Publishing, Inc. 10475 Crosspoint Boulevard Indianapolis, IN 46256 www.wiley.com Copyright © 2009 by Wiley Publishing, Inc., Indianapolis, Indiana Published simultaneously in Canada ISBN: 978-0-470-37733-8 Manufactured in the United States of America 10 9 8 7 6 5 4 3 2 1 Library of Congress Cataloging-in-Publication Data Phung, Samuel, 1960- Professional Windows embedded CE 6.0 / Samuel Phung. p. cm. Includes index. ISBN 978-0-470-37733-8 (paper/website) 1. Embedded computer systems—Programming. 2. Real-time data processing. 3. Microsoft Windows (Computer file) I. Title. TK7895.E42P49 2008 005.26—dc22 2008037338 No part of this publication may be reproduced, stored in a retrieval system or transmitted in any form or by any means, electronic, mechanical, photocopying, recording, scanning or otherwise, except as permitted under Sections 107 or 108 of the 1976 United States Copyright Act, without either the prior written permission of the Publisher, or authorization through payment of the appropriate per-copy fee to the Copyright Clearance Center, 222 Rosewood Drive, Danvers, MA 01923, (978) 750-8400, fax (978) 646-8600. Requests to the Publisher for permission should be addressed to the Legal Department, Wiley Publishing, Inc., 10475 Crosspoint Blvd., Indianapolis, IN 46256, (317) 572-3447, fax (317) 572-4355, or online at http://www.wiley.com/go/permissions. Limit of Liability/Disclaimer of Warranty: The publisher and the author make no representations or warranties with respect to the accuracy or completeness of the contents of this work and specifically disclaim all warranties, including without limitation warranties of fitness for a particular purpose. No warranty may be created or extended by sales or promotional materials. The advice and strategies contained herein may not be suitable for every situation. This work is sold with the understanding that the publisher is not engaged in rendering legal, accounting, or other professional services. If professional assistance is required, the services of a competent professional person should be sought. Neither the publisher nor the author shall be liable for damages arising herefrom. The fact that an organization or web site is referred to in this work as a citation and/or a potential source of further information does not mean that the author or the publisher endorses the information the organization or web site may provide or recommendations it may make. Further, readers should be aware that Internet web sites listed in this work may have changed or disappeared between when this work was written and when it is read. For general information on our other products and services, please contact our Customer Care Department within the United States at (800) 762-2974, outside the United States at (317) 572-3993 or fax (317) 572-4002. Trademarks: Wiley, the Wiley logo, Wrox, the Wrox logo, Wrox Programmer to Programmer, and related trade dress are trademarks or registered trademarks of John Wiley & Sons, Inc. and/or its affiliates, in the United States and other countries, and may not be used without written permission. Windows is a registered trademark of Microsoft Corporation in the United States and/or other countries. All other trademarks are the property of their respective owners. Wiley Publishing, Inc., is not associated with any product or vendor mentioned in this book. Wiley also publishes its books in a variety of electronic formats. Some content that appears in print may not be available in electronic books. ffirs.indd viffirs.indd vi 9/26/08 5:37:45 PM9/26/08 5:37:45 PM www.it-ebooks.info About the Author Samuel Phung has worked for more than 20 years in both the hardware and software areas of the computer industry. In the late 1980s, he worked for computer hardware companies. In the early 1990s, he led a financial database software development team, developing software for the banking industry. Later he led a software team developing Windows - based telephony applications for a venture capital - funded startup. In the late 1990s, he became engaged with the Windows Embedded product team, starting with Windows NT 4.0 Embedded. He has been working with Windows Embedded CE since version 2.12 was introduced. He currently works for ICOP Technology, Inc., in El Monte, California, where he is responsible for strategic business development for the North American region. Among his Windows Embedded activities is initiating ICOP local - language web sites supporting the Taiwan, China, and Japan regions. He also maintains a personal web site, www.embeddedpc.net , to provide Windows Embedded information resources for new developers. Phung graduated from California State University Long Beach (CSULB) in 1984 with an EE degree. About the Technical Editors Todd Meister has been developing using Microsoft technologies for more than 10 years. He ’ s been a technical editor on more than 50 titles ranging from SQL Server to the .NET Framework. He is an assistant director for computing services at Ball State University in Muncie, Indiana. He and his wife, Kimberly, live in central Indiana with their four children. Contact Todd at tmeister@sycamoresolutions.com . Dan Francis has been working professionally in software development since he was 15 and is currently a software engineering manager for a Fortune 50 company. He lives with his wife and twin daughters in northern Maryland. Contact Dan at DanielEFrancis@gmail.com . ffirs.indd viiffirs.indd vii 9/26/08 5:37:46 PM9/26/08 5:37:46 PM www.it-ebooks.info ffirs.indd viiiffirs.indd viii 9/26/08 5:37:46 PM9/26/08 5:37:46 PM www.it-ebooks.info [...]... Contents Introduction xxi Chapter 1: Windows Embedded CE What Is Embedded? 1 1 Embedded Devices Embedded Software Embedded Devices and Software The Windows Embedded Family Windows XP Embedded Windows Embedded Point of Service Windows Embedded CE 6.0 1 2 3 3 4 4 4 Modular and Compact OS Real-Time Operating System Supported Hardware New Features in CE 6.0 R2 Customizable UI Wired and Wireless Connectivity Graphics... 5 6 6 7 8 8 9 9 10 11 Developing CE Applications Testing and Debugging What Can Windows Embedded CE Do? Summary 12 12 13 14 Chapter 2: Development Environment and Tools Windows Embedded CE Platform Builder Windows Embedded CE 6.0 Installation Supported Processors Installation Sequence Quick Fix Engineering and Update Windows Embedded CE Terminology Windows Embedded CE Environment Variables 15 15 16... Studio 2005 Service Pack 1 ❑ Visual Studio 2005 sp1 upgrade for Vista (only needed for Windows Vista machine) ❑ Windows Embedded CE 6.0 ❑ Windows Embedded CE 6.0 Service Pack 1 ❑ Windows Embedded CE 6.0 R2 ❑ ICOP_eBox4300_60E_BSP.msi board support package ❑ VS2005_CoreCon_X86_WINCE600.msi CoreCon component for x86 processor ❑ VS2005_CoreCon_ARMV4I_WINCE600.msi CoreCon component for ARMV4I processor xxviii... throughout its useful life The Windows Embedded Family The Windows Embedded CE, Windows XP Embedded, and Windows Embedded Point of Service operating systems are products of Microsoft s Windows Embedded product group Developers new to CE may be thinking it’s a scaled-down version of the Windows desktop OS But while CE shares some common development tools with the desktop Windows OS, the CE kernel is distinctively... PM Windows Embedded CE While the traditional Windows desktop operating system (OS) developed by Microsoft was designed to run on well-defined and standardized computing hardware built with the x86 processor, Windows Embedded CE was designed to support multiple families of processors This chapter provides an overview of CE and improvements for the latest Windows Embedded CE 6.0 R2 release Multiple Windows. .. existing computer projector to become a Windows Network Projector Appendix A: Windows Embedded CE References There is a large pool of information resources available for Windows Embedded CE This appendix provides references to some of these resources Appendix B: Installation and Software The Windows Embedded CE 6.0 R2 development environment requires multiple pieces of software and updates for the software... customized runtime image ❑ Target device connectivity for image download ❑ Debugging and debugging tools ❑ Developing managed-code applications for Windows Embedded CE using Visual Studio ❑ Developing native-code applications for Windows Embedded CE using Visual Studio ❑ Autolaunch applications when Windows Embedded CE starts ❑ Deploying a Windows Embedded CE 6.0 device with BIOS Loader How This Book Is... Book Covers This book talks about the Windows Embedded CE development environment and uses simple exercises to show how to perform different development tasks These exercises are created with Windows Embedded CE 6.0 Platform Builder and Visual Studio 2005 Following is a list of the covered subjects: ❑ Windows Embedded CE Operating System overview ❑ Windows Embedded CE development environment overview... release Multiple Windows Embedded products, including Windows Embedded CE, are being promoted and supported by the same business unit within Microsoft, the Windows Embedded Product group What Is Embedded? Embedded is an industry buzz word that’s been in use for many years Although it’s common for us to hear terms like embedded system, embedded software, embedded computer, embedded controller, and the... Registry Registry Flushing Windows Embedded CE Registry Files Registry for Windows Embedded CE Components Serial Debugging Useful Registry References 166 166 169 170 170 173 175 Auto-Flush and Save Registry Settings Device Name for USB Removable Storage Disable Suspend from the Start Menu Internet Explorer Startup Page Static IP Address Windows Embedded CE Device Name Accessing the Registry Summary . Programmer TM www.it-ebooks.info Professional Microsoft ® Windows ® Embedded CE 6. 0 Enhance Your Knowledge Advance Your Career Professional Microsoft Windows Embedded CE 6. 0 978 -0- 4 70- 37733-8 Provides. 300 Configure the OS Design for Testing 300 Develop the VB 200 5 Application 301 Add the VB 200 5 Application to the OS Design 304 Summary 3 06 Chapter 16: