Step 1: Create a Component

In this step, you use Component Designer to create a component for a Hello World application.

  1. Create a new directory to store your component resources. For example, create C:\HelloWorld_Component.

  2. From the Windows XP Embedded CD-ROM, Disk 1, copy the HelloWorld.exe file from the Samples\Tutorial directory to the HelloWorld_Component directory.

  3. The HelloWorld.exe application requires the msvbvm60.dll library to run. This file is located in the C:\Windows\System32 directory on Windows XP Professional systems. Copy this file to the HelloWorld_Component directory.

  4. Run Component Designer.

  5. From the File menu, choose New.

    A new document opens.

  6. Expand the Windows XP Embedded Client (x86) node.

  7. In the SLD browser, right-click Components, and then choose Add Component.

    The new component automatically expands in the SLD browser.

  8. In the SLD browser, right-click Repositories, and then choose Add Repository.

  9. In the Name box in the Repository Properties dialog box, replace the default repository name with HelloRepository.

  10. In the Source Path dialog box, browse to C:\HelloWorld_Component and then choose OK.

  11. In the SLD browser, choose New Component. In the Name dialog box, replace the default name with Hello World.

  12. Choose the Repositories button on the right side of the Repository box.

  13. In the Select Repository dialog box, select HelloRepository, and then choose OK.

    You have now created a component and associated it with a repository, which is the container for the files used in this tutorial.

  14. In the SLD browser, right-click Files, and then choose Add, and then Files in Folder.

  15. In the Browse For Folder dialog box, locate and choose the HelloWorld_Component folder, and then choose OK. When prompted if you want to continue, choose Yes.

    The Adding Resources dialog box appears.

  16. When the Adding Resources dialog box displays the text "All resources were added successfully", choose Close.

  17. To save the .sld file for your component, choose the File menu, and then choose Save. Save the file as HelloWorld in the Tutorial folder.

    You have now finished creating your component definition associated with a repository, and saved the information in an .sld file.

  18. From the File menu, choose Exit.

You are now ready to import the component into the component database.

See Also

Step 2: Import the Component to the Database | Tutorial: Creating a Custom Component

Last updated on Wednesday, October 18, 2006

© 2006 Microsoft Corporation. All rights reserved.