Windows CE .NET Using Shared Source Code in Microsoft Windows CE .NET Author: Mike Mitchell, Microsoft Corporation, Updated January 2002 Applies to: Microsoft® Windows® CE .NET Microsoft® Platform Builder version 4.0 Summary: All Microsoft Windows CE .NET editions, which include Full, Evaluation, and Emulation, provide access to additional source code covered by the Microsoft Shared Source License Agreement. You can use this code to help you debug or as a reference to better understand your platform. This paper will help you complete the following tasks: Install Windows CE .NET shared source code. View a list of shared source components included in Windows CE .NET. Work with source code in the Private directory. Work with Private directory source code in the IDE. The information contained in this document represents the current view of Microsoft Corporation on the issues discussed as of the date of publication. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information presented after the date of publication. This White Paper is for informational purposes only. MICROSOFT MAKES NO WARRANTIES, EXPRESS OR IMPLIED, AS TO THE INFORMATION IN THIS DOCUMENT. Complying with all applicable copyright laws is the responsibility of the user. Without limiting the rights under copyright, no part of this document may be reproduced, stored in or introduced into a retrieval system, or transmitted in any form or by any means (electronic, mechanical, photocopying, recording, or otherwise), or for any purpose, without the express written permission of Microsoft Corporation. Microsoft may have patents, patent applications, trademarks, copyrights, or other intellectual property rights covering subject matter in this document. Except as expressly provided in any written license agreement from Microsoft, the furnishing of this document does not give you any license to these patents, trademarks, copyrights, or other intellectual property. © 2002 Microsoft Corporation. All rights reserved. Microsoft, MS-DOS, Windows and the Windows logo are either registered trademarks or trademarks of Microsoft Corporation in the United States and/or other countries. The names of actual companies and products mentioned herein may be the trademarks of their respective owners. Microsoft Corporation • One Microsoft Way • Redmond, WA 98052-6399 • USA 05/00 Content Content ...........................................................................1 Installing Windows CE .NET Shared Source Code ............2 Building a Platform Using Shared Source Code Files in the Private Directory ...........................................................10 Verifying the New Component 11 Restoring the Original Binary Files 12 For More Information ....................................................13 Microsoft Windows Embedded Developer Center 13 Join, Share and Develop in the Windows Embedded Community 13 Using Shared Source Code in Microsoft Windows CE .NET 1 Installing Windows CE .NET Shared Source Code Microsoft® Windows® CE .NET is distributed on multiple compact discs (CDs) or a single digital video disc (DVD) or as the downloadable Emulation Edition from the Web. Use the Installation Wizard to install Windows CE .NET on your workstation. All shared source code for Windows CE .NET is installed in the %_WINCEROOT%\Private directory. For more information about the Shared Source License Agreement, see the Microsoft Licensing Web site. The Platform Builder setup application, Setup.exe, performs the following tasks: Copies the Platform Builder files to the directories you specify. One directory is used for the integrated development environment (IDE) and one directory is used for the operating system (OS). Adds the program to the Start menu. To install Windows CE .NET and the shared source code: 1. Insert the Windows CE .NET installation media into the appropriate drive of your development system, or download and run setup for the Emulation Edition. 2. The Welcome to Microsoft Windows CE .NET screen appears. 3. Choose Install. 4. The Setup Wizard starts, displaying the Microsoft Windows CE .NET Welcome screen. 5. Choose Next. 6. The license agreement appears. 7. Read the agreement. If you do not agree to the terms of the license agreement, choose I do not accept the terms in the license agreement, and then choose Cancel to exit the installation. – or – Choose I accept the terms in the license agreement, and then choose Next. The Customer Information screen appears. 1. Type the following information: 2. Your name. 3. The name of your organization or company. 4. The product key, which is located on your Windows CE .NET installation media sleeve. Note If you are installing the downloaded Emulation Edition, no product key is necessary. Using Shared Source Code in Microsoft Windows CE .NET 2 5. Choose Next. 6. The Setup Type screen appears. 7. Choose Custom (Tools and OS) to install support for the IDE and support for building OS images, and then choose Next. 8. The Destination Folders screen appears. 9. Choose Change if you want to change the folder in which Platform Builder or Windows CE .NET will be installed. 10. Choose Next. 11. The Custom Setup screen appears. 12. Select the microprocessors that you want to support, and then choose Shared Source for Windows CE .NET. 13. Note If you are installing the downloaded Emulation Edition, no processors are listed. 14. Choose This feature will be installed on the local hard drive, and then choose Next. 15. The Shared Source License Agreement appears. 16. If you do not agree to the terms of the license agreement, choose I do not accept the terms in the license agreement, and then choose Cancel to exit the installation. – or – Choose I accept the terms in the license agreement, and then choose Next. The Ready to Install screen appears. 1. Choose Install to begin copying the Platform Builder and Windows CE .NET files to your hard drive. 2. Choose Finish to exit the wizard after the installation has completed. The following table shows the components included with shared source code for Windows CE .NET. Component Description Subdirectory SYSGEN Environment Variable (sysgen component name) Buildable Build command Cisco 802.11 driver $(_WINCEROOT) \PRIVATE\WINCEOS\COMM \NDISMINI\PCX500 SYSGEN_ETH_CISCO (pcx500) Yes Build -c Message Queuing $(_WINCEROOT) \PRIVATE\SERVERS\MSMQ SYSGEN_MSMQ (msmqadm) Yes Build -c Using Shared Source Code in Microsoft Windows CE .NET 3 \UTILS\ADMIN Message Queuing $(_WINCEROOT) \PRIVATE\SERVERS\MSMQ \UTILS\ACTIVEX\MQOA SYSGEN_MSMQ (mqoa) Yes Build -c Message Queuing $(_WINCEROOT) \PRIVATE\SERVERS\MSMQ \SC\CE\DRIVER SYSGEN_MSMQ (msmqd) Yes Build -c Message Queuing $(_WINCEROOT) \PRIVATE\SERVERS\MSMQ \SC\CE\CLIENT SYSGEN_MSMQ (msmqrt) Yes Build -c Message Queuing $(_WINCEROOT) \PRIVATE\SERVERS\MSMQ \SC\CE\SERVER SYSGEN_MSMQ (msmq) Yes Build -c Message Queuing $(_WINCEROOT) \PRIVATE\SERVERS\MSMQ \SC\SRC SYSGEN_MSMQ (msmq, msmqd) Yes Build -c Message Queuing $(_WINCEROOT) \PRIVATE\SERVERS\MSMQ \SC\CE\STUBS SYSGEN_MSMQ (msmq, msmqd) Yes Build -c Message Queuing $(_WINCEROOT) \PRIVATE\SERVERS\MSMQ \SC\SRMP\CORE SYSGEN_MSMQ_SRMP (msmqdSrmp) Yes Build -c Message Queuing $(_WINCEROOT) \PRIVATE\SERVERS\MSMQ \SC\SRMP\ISAPI SYSGEN_MSMQ_SRMP (SrmpIsapi) Yes Build -c ASP support for web server $(_WINCEROOT) \PRIVATE\SERVERS\ASP \CORE SYSGEN_ASP (asp) Yes WINCEATL=1 needs to be replaced with WINCEATL30=1 in the ATL.src file. ASP support for web server $(_WINCEROOT) \PRIVATE\SERVERS\ASP \COLLECTS SYSGEN_ASP (asp) Yes Build -c ASP support for web server $(_WINCEROOT) \PRIVATE\SERVERS\ASP \PARSEEXT SYSGEN_ASP (asp) Yes Build -c ASP support for web server $(_WINCEROOT) \PRIVATE\SERVERS\ASP \STUBS SYSGEN_ASP (asp) Yes Build -c Using Shared Source Code in Microsoft Windows CE .NET 4 Web Server $(_WINCEROOT) \PRIVATE\SERVERS\HTTP \CORE SYSGEN_HTTPD (httpd) Yes Build -c Web Server $(_WINCEROOT) \PRIVATE\SERVERS\HTTP \BUILDEXE SYSGEN_HTTPD (httpdexe) Yes Build -c Web Server $(_WINCEROOT) \PRIVATE\SERVERS\HTTP \ASP SYSGEN_HTTPD && SYSGEN_ASP (httpd) Yes Build -c Web Server $(_WINCEROOT) \PRIVATE\SERVERS\HTTP \AUTH SYSGEN_HTTPD (httpd) Yes Build -c Web Server $(_WINCEROOT) \PRIVATE\SERVERS\HTTP \EXTNS SYSGEN_HTTPD (httpd) Yes Build -c Web Server $(_WINCEROOT) \PRIVATE\SERVERS\HTTP \FILTERS SYSGEN_HTTPD (httpd) Yes Build -c Web Server $(_WINCEROOT) \PRIVATE\SERVERS\HTTP \ISAPI SYSGEN_HTTPD (httpd) Yes Build -c Web Server $(_WINCEROOT) \PRIVATE\SERVERS\HTTP \PARSER SYSGEN_HTTPD (httpd) Yes Build -c Web Server $(_WINCEROOT) \PRIVATE\SERVERS\HTTP \STUBS SYSGEN_HTTPD (httpd) Yes Build -c Services support $(_WINCEROOT) \PRIVATE\SERVERS\SERVICES \LIB SYSGEN_SERVICES (services) Yes Build -c Universal Plug and Play $(_WINCEROOT) \PRIVATE\SERVERS\UPNP \UPNPCAPI SYSGEN_UPNP_CTRL || SYSGEN_UPNP_DEVICE || SYSGEN_UPNP_DEVICE_MINI (upnpcapi, upnpctrl, upnphost, IGD) Yes Build -c Universal Plug and Play $(_WINCEROOT) \PRIVATE\SERVERS\UPNP \UPNPCTRL SYSGEN_UPNP_CTRL (upnpctrl) Yes Build -c Using Shared Source Code in Microsoft Windows CE .NET 5 Universal Plug and Play $(_WINCEROOT) \PRIVATE\SERVERS\UPNP \UPNPHOST SYSGEN_UPNP_DEVICE (upnphost) Yes Build -c Universal Plug and Play $(_WINCEROOT) \PRIVATE\SERVERS\UPNP \UPNPLOADER SYSGEN_UPNP_DEVICE (upnploader) Yes Build -c Universal Plug and Play $(_WINCEROOT) \PRIVATE\SERVERS\UPNP \UPNPSVC SYSGEN_UPNP_CTRL || SYSGEN_UPNP_DEVICE || SYSGEN_UPNP_DEVICE_MINI (upnpsvc, upnpctrl) Yes Build –c Universal Plug and Play $(_WINCEROOT) \PRIVATE\SERVERS\UPNP \UTIL SYSGEN_UPNP_CTRL || SYSGEN_UPNP_DEVICE || SYSGEN_UPNP_DEVICE_MINI (upnpsvc, upnpctrl, upnphost) Yes Build –c Universal Plug and Play $(_WINCEROOT) \PRIVATE\SERVERS\UPNP \SSDP SYSGEN_UPNP_CTRL || SYSGEN_UPNP_DEVICE || SYSGEN_UPNP_DEVICE_MINI (upnpsvc, upnpcapi, upnpctrl, upnphost, upnploader) Yes Build –c Universal Plug and Play $(_WINCEROOT) \PRIVATE\UPNP\UPBASE SYSGEN_UPNP_CTRL || SYSGEN_UPNP_DEVICE || SYSGEN_UPNP_DEVICE_MINI (upnpsvc, upnpcapi, upnpctrl, upnphost, upnploader) Yes Build –c Universal Plug and Play $(_WINCEROOT) \PRIVATE\SERVERS\UPNP \YACL SYSGEN_UPNP_CTRL || SYSGEN_UPNP_DEVICE || SYSGEN_UPNP_DEVICE_MINI (upnpsvc, upnpcapi, upnpctrl, upnphost, upnploader) Yes Build –c SOAP Toolkit $(_WINCEROOT) \PRIVATE\SERVERS\SOAP2 \SOURCES\SRC\MSSOAPRES SYSGEN_SOAPTK_SERVER || SYSGEN_SOAPTK_CLIENT (mssoapr) Yes Build –c (Note The line '#include "crt\tchar.h"' in SOAPUTIL.H may need to be removed to avoid build errors.) SOAP Toolkit $(_WINCEROOT) \PRIVATE\SERVERS\SOAP2 \SOURCES\SRC\CONNECT \SOAPCONN SYSGEN_SOAPTK_SERVER || SYSGEN_SOAPTK_CLIENT (mssoap1) Yes Build -c (Note The line '#include "crt\tchar.h"' in SOAPUTIL.H may need to be removed to avoid build errors.) Using Shared Source Code in Microsoft Windows CE .NET 6 SOAP Toolkit $(_WINCEROOT) \PRIVATE\SERVERS\SOAP2 \SOURCES\SRC\CONNECT \ALLCONN SYSGEN_SOAPTK_SERVER || SYSGEN_SOAPTK_CLIENT (WiSC10, XHSC10) Yes Build -c (Note The line '#include "crt\tchar.h"' in SOAPUTIL.H may need to be removed to avoid build errors.) SOAP Toolkit $(_WINCEROOT) \PRIVATE\SERVERS\SOAP2 \SOURCES\SRC\CONNECT \WICONN SYSGEN_SOAPTK_SERVER || SYSGEN_SOAPTK_CLIENT (WiSC10) Yes Build -c (Note The line '#include "crt\tchar.h"' in SOAPUTIL.H may need to be removed to avoid build errors.) SOAP Toolkit $(_WINCEROOT) \PRIVATE\SERVERS\SOAP2 \SOURCES\SRC\CONNECT \XCONN SYSGEN_SOAPTK_SERVER || SYSGEN_SOAPTK_CLIENT (XHSC10) Yes Build -c (Note The line '#include "crt\tchar.h"' in SOAPUTIL.H may need to be removed to avoid build errors.) SOAP Toolkit $(_WINCEROOT) \PRIVATE\SERVERS\SOAP2 \SOURCES\SRC\SOAPMSG SYSGEN_SOAPTK_SERVER || SYSGEN_SOAPTK_CLIENT (mssoap1) Yes Build -c (Note The line '#include "crt\tchar.h"' in SOAPUTIL.H may need to be removed to avoid build errors.) SOAP Toolkit $(_WINCEROOT) \PRIVATE\SERVERS\SOAP2 \SOURCES\SRC\IDL SYSGEN_SOAPTK_SERVER || SYSGEN_SOAPTK_CLIENT (mssoapuuid) Yes Build -c (Note The line '#include "crt\tchar.h"' in SOAPUTIL.H may need to be removed to avoid build errors.) SOAP Toolkit $(_WINCEROOT) \PRIVATE\SERVERS\SOAP2 \SOURCES\SRC\ISAPI SYSGEN_SOAPTK_SERVER (soapisap) Yes Build -c (Note The line '#include "crt\tchar.h"' in SOAPUTIL.H may need to be removed to avoid build errors.) SOAP Toolkit $(_WINCEROOT) \PRIVATE\SERVERS\SOAP2 \SOURCES\SRC\MSSOAP SYSGEN_SOAPTK_SERVER || SYSGEN_SOAPTK_CLIENT (mssoap1) Yes Build -c (Note The line '#include "crt\tchar.h"' in SOAPUTIL.H may need to be removed to avoid build errors.) SOAP $(_WINCEROOT) SYSGEN_SOAPTK_SERVER || Yes Build -c Using Shared Source Code in Microsoft Windows CE .NET 7 Toolkit \PRIVATE\SERVERS\SOAP2 \SOURCES\SRC\SOAPREADER SYSGEN_SOAPTK_CLIENT (mssoap1) SOAP Toolkit $(_WINCEROOT) \PRIVATE\SERVERS\SOAP2 \SOURCES\SRC\SOAPSER SYSGEN_SOAPTK_SERVER || SYSGEN_SOAPTK_CLIENT (mssoap1) Yes Build -c (Note The line '#include "crt\tchar.h"' in SOAPUTIL.H may need to be removed to avoid build errors.) SOAP Toolkit $(_WINCEROOT) \PRIVATE\SERVERS\SOAP2 \SOURCES\SRC\SOAPUTIL SYSGEN_SOAPTK_SERVER || SYSGEN_SOAPTK_CLIENT (mssoap1) Yes Build -c (Note The line '#include "crt\tchar.h"' in SOAPUTIL.H may need to be removed to avoid build errors.) SOAP Toolkit $(_WINCEROOT) \PRIVATE\SERVERS\SOAP2 \SOURCES\SRC\WSDL SYSGEN_SOAPTK_SERVER || SYSGEN_SOAPTK_CLIENT (mssoap1) Yes Build -c (Note The line '#include "crt\tchar.h"' in SOAPUTIL.H may need to be removed to avoid build errors.) SOAP Toolkit $(_WINCEROOT) \PRIVATE\SERVERS\SOAP2 \SOUSRCES\SRC\PRXYSTUB SYSGEN_SOAPTK_BASE (soapprxy) Yes Build –c from \private\servers\soap2 (Note The line '#include "crt\tchar.h"' in SOAPUTIL.H may need to be removed to avoid build errors.) Unimodem TAPI Service Provider $(_WINCEROOT) \PRIVATE\WINCEOS\COMM \TAPI\UNIMODEM SYSGEN_MODEM (unimodem) Yes Build -c Explorer $(_WINCEROOT) \PRIVATE\WCESHELLFE\JUPITER \SERVER\EXPLORER N/A No N/A ASForms $(_WINCEROOT) \PRIVATE\WCESHELLFE\JUPITER \FORMS\ASFORM N/A No N/A CE Shell $(_WINCEROOT) \PRIVATE\WCESHELLFE\JUPITER N/A No N/A (Note The line '#include "crt\tchar.h"' in SOAPUTIL.H may need to be removed to avoid build errors.) Using Shared Source Code in Microsoft Windows CE .NET 8 \SERVER\CESHELL DHCP $(_WINCEROOT) \PRIVATE\WINCEOS\COMM \DHCP SYSGEN_ETHERNET (dhcp) Yes Build –c AutoDial $(_WINCEROOT) \PRIVATE\COMM\TCPIPW \IPNAT\AUTODIAL SYSGEN_GATEWAY || SYSGEN_PPP (autodial) Yes Build -c Using Shared Source Code in Microsoft Windows CE .NET 9 Building a Platform Using Shared Source Code Files in the Private Directory This section describes how to build components from shared source code that is typically located in the %_WINCEROOT%\Private directory, for example, C:\Wince400\Private. Before creating a platform containing the Microsoft source code you have modified, back up the original files by copying them to another directory. If you build components for winceos, copy the following directories. %_winceroot%\public\common\oak\lib\"proc"\retail %_winceroot%\public\common\oak\lib\"proc"\debug If you build components for servers, copy the following directories. %_winceroot%\public\servers\oak\lib\"proc"\retail %_winceroot%\public\servers\oak\lib\"proc"\debug If you build components for wceshellfe, copy the following directories. %_winceroot%\public\wceshellfe\oak\lib\"proc"\retail %_winceroot%\public\wceshellfe\oak\lib\"proc"\debug Under the Shared Source License Agreement, you cannot include modified source code in a platform except for noncommercial purposes. You will need to restore the original files to the Public directory and rebuild your platform prior to producing a device for commercial use. To build a platform containing modified shared source code: 1. To start Platform Builder, choose the Start menu, point to Programs, point to Microsoft Windows CE .NET, and then choose Platform Builder. 2. Choose Open Workspace in the UI, open the directory for your platform, and then open either the associated *.pbw or *.wce file. 3. In the Feature View of the UI, expand the SOURCES= branch to view the list of source files that can be modified. Double-click the source file to open and add, delete, or change the source code to address your debugging needs. Note If you do not see a Build Commands branch under the component, there is no shared source available for that component. Not all source code may be listed in the IDE. You can manually search and locate source files under Private to modify and build them if they are not listed in the IDE. 4. If you have not already built a platform, create a platform that will use your source code. 5. From the Build menu, choose Build Platform. 6. From the Build menu, choose Open Build Release Directory. Using Shared Source Code in Microsoft Windows CE .NET 10 7. An MS-DOS® window appears. 8. At the command prompt, type Set to verify that the correct environment variables are set to build your platform, including any new components. 9. Change the directory to locate the shared source code you want to modify. 10. The private directory is typically Wince400\Private. The shared source code is located in the tree below that directory. 11. Ensure that the current directory contains a dirs or sources file, and then at the command prompt, type Build -c to perform a clean build. 12. If errors occur during the build process, review the Build.err and Build.log files. 13. Run Sysgen on the component using one of the following methods: Determine the sysgen component name for the component that you modified from the above table. Sysgen <sysgen_component_name> If the component's shared source is located under \Private\<treeName>, at the command prompt, type: Sysgen –p <treeName> <sysgen_component_name> 1. From the Platform Builder Build menu, choose Build Platform. You now have a platform that you can download to your device for debugging and verification. Verifying the New Component The files copied to your flat release directory constitute your component. After you build a new component, the component files are created in the source directory and replace existing files in the flat release directory. To verify the component, search for the component files in the flat release directory and view the modification date. You can also delete the component files after backing them up and then verify the creation date and time after building the new component. Using Shared Source Code in Microsoft Windows CE .NET 11 Restoring the Original Binary Files This section describes how to restore the original Windows CE .NET binary files if you did not back up your Public directory as described in the procedure above. To restore the original binary files: 1. Delete the modified binary files from the Public directories. 2. Run Windows CE .NET Setup Wizard and select Repair from the Program Maintenance screen. This will re-install the deleted files. 3. Rebuild your platform with the shipping binary files. Upon rebuilding, your platform will no longer contain your modified binary files. Alternatively, you can uninstall Windows CE .NET and remove files that remain in the Public directory after the uninstall process has completed. After deleting the remaining files, re-install the product to restore all files to their original state. Using Shared Source Code in Microsoft Windows CE .NET 12 For More Information For the latest, Windows CE .NET information: 1. Developer information, visit: http://msdn.microsoft.com/embedded 2. Product information visit: http://www.microsoft.com/windows/embedded 3. Community Tips and Tricks, visit: http://www.microsoft.com/windows/embedded/community The online documentation and context-sensitive Help included with Windows CE .NET also provide comprehensive background information and instructions for using Windows CE .NET. To access the online documentation 1. Open Windows CE .NET Platform Builder 4.0 2. Select the Contents tab on the Help menu to view the documentation. Note: Install the latest Windows CE .NET Product Help File updates from the Windows Embedded Download Center on MSDN. Microsoft Windows Embedded Developer Center You can find the latest developer information including news, product documentation, technical articles, How To’s, Downloads, Code Samples, Fixes and Updates for Windows CE .NET on the MSDN Windows Embedded Developer Center. http://msdn.microsoft.com/embedded Join, Share and Develop in the Windows Embedded Community Visit the Windows Embedded Community for resources that help you stay current on platform technologies including Tips and Tricks, chats, newsgroups, featured downloads and more. You can also share your development expertise, gain from valuable peer-to-peer support relationships and find answers to many Windows CE .NET related questions. http://www.microsoft.com/windows/embedded/community/ Using Shared Source Code in Microsoft Windows CE .NET 13
© Copyright 2026 Paperzz