Share via


Creating a Device-Side Project for an Existing Plug-in (Windows Embedded CE 6.0)

1/6/2010

If there are existing Microsoft Visual Studio 2005 solutions that contain plug-ins based on the Microsoft Remote Tools Framework on your development workstation, you can choose to create a new device-side component for a selected plug-in. For information about creating new plug-ins, see Creating a New Plug-in Using the Project Wizard.

Perform the following procedures in order to create a new device-side project for an existing plug-in.

To create a new device-side project for an existing plug-in

  1. Open the Visual Studio solution (.sln) file associated with the plug-in for which you want to create a new device-side project.

  2. From the File menu, select Add, and then select New Project.

    The Add New Project dialog box appears.

  3. In the left pane of the dialog box, expand Visual C++ and select Smart Device, and then, in the right pane, select Win32 Smart Device Project.

  4. In the Name box, enter a name for your new project and then choose OK.

    The Win32 Smart Device Project Wizard appears.

  5. To continue configuring your new project, choose Next.

  6. In the left pane, Platforms is highlighted to display the step that you are on. In the right pane, remove all selected SDKs.

  7. From the Installed SDKs list, select the SDKs that you want to target and then add them to the Selected SDKs list. To continue, choose Next.

  8. From the Application type options, select Console Application.

  9. Under Additional options, select Empty project, and then choose Finish.

    Visual Studio creates the new device-side project, and you are now ready to modify the project.

To add source files to the new device-side project

  1. In Solution Explorer, the new project is automatically expanded. In the hierarchy for the new project, select Source Files, then from the context menu, select Add, and then select Existing Item.

    The Add Existing Item dialog box appears.

  2. In the Add Existing Item dialog box, navigate to the directory containing the device-side source files that you want to add.

    For example, to add the device-side source files that the SimplePlugin sample uses, navigate to the DeviceSide directory and add DeviceSide.cpp and Stdafx.cpp.

  3. To complete adding these files to your device-side project and then close the dialog box, choose Add.

To add header files to the new device-side project

  1. In Solution Explorer, the new project is automatically expanded. In the hierarchy for the new project, select Header Files, then from the context menu, select Add, and then select Existing Item.

    The Add Existing Item dialog box appears.

  2. In the Add Existing Item dialog box, navigate to the directory containing the device-side header files that you want to add.

    For example, to add the device-side header files that the SimplePlugin sample uses, navigate to the DeviceSide directory and add DeviceSide.h, Resourceppc.h, and Stdafx.h. Then navigate to the Microsoft Remote Tools Framework\Include directory and then add Cecorecon.h.

  3. To complete adding these files to your device-side project and then close the dialog box, choose Add.

To configure the new device-side project settings

  1. In Solution Explorer, select the device-side project and then, from the Project menu, select Properties.

    The Property Pages dialog box for your project appears.

  2. In the left pane, select Configuration Properties.

  3. At the top of the dialog box, from the Configuration list, select All Configurations, and then, from the Platform list, select All Platforms.

    This ensures that your changes apply to all configurations and platforms for your device-side project.

  4. In the left pane, under Configuration Properties, expand C/C++, and then select General.

  5. In the right pane, in the Additional Include Directories box, enter the following value.

    C:\Program Files\Microsoft Remote Tools Framework\1.00\include
    
  6. In the left pane, under Configuration Properties, navigate to C/C++, and then select Language.

  7. Make sure that Treat wchar_t as Built-in Type is set to Yes.

  8. In the left pane, under Configuration Properties, expand Linker, and then select General.

  9. In the Output File box, enter the path to the location where your device-side component is located, using the following format.

    $(OutDir)/<DeviceSideComponent>.exe
    

    Make sure that the file name matches the file name that is stored in the .cebundleinfo file for your project.

  10. In the left pane, under Configuration Properties, navigate to Linker, and then select Debugging.

  11. In the Generate Program Database File box, enter the path to the location where the program database file for your device-side component is located, using the following format.

    $(OutDir)/<DeviceSideComponent>.pdb
    

    Make sure that the file name matches the file name that is stored in the .cebundleinfo file for your project.

  12. In the left pane, under Configuration Properties, navigate to Linker, and then select Advanced.

  13. In the right pane, in the Entry Point box, enter the entry point that you want to use.

    If you are using the sample SimplePlugin project, use an empty value. This ensures that the entry point, by default, uses the entry point that the SimplePlugin project uses.

  14. To save your changes and close the dialog box, choose OK.

To set dependencies for the new device-side project

  1. In Solution Explorer, select the device-side project and then, from the Project menu, select Properties.

    The Property Pages dialog box for your project appears.

  2. In the left pane, select Configuration Properties.

  3. At the top of the dialog box, from the Configuration list, select All Configurations.

    This ensures that your changes apply to all configurations for your device-side project.

  4. In the left pane, under Configuration Properties, expand Linker, and then select Input.

  5. At the top of the dialog box, from the Platforms list, select the platform that you want to target, and then set the dependencies for that platform.

    For information about what dependencies to use for each platform, see Additional Dependencies for a Device-Side Project.

  6. To save your changes and close the dialog box, choose OK.

To add the new device-side executables to the tool bundle

  1. To open the .cebundleinfo file for your tool in the Bundle Input Editor, in Solution Explorer, select the file and then, from the context menu, select Open.

  2. In the Bundle Input Editor, click on Device Packages.

  3. To add a new package, click Add.

    The Add Package dialog box appears.

  4. Select the package and then enter a new name.

  5. To create a new component, click Add Component. Select the component and then enter a new name.

  6. In the box next to the Generalize Path button, add the location where the built executable is created.

    For example, in the SimplePlugin sample project, the following example shows the path for the MIPSII device-side component.

    C:\Program Files\Microsoft Remote Tools Framework\1.00\Samples\SimplePlugIn\DeviceSide\MIPSII\%Configuration%\DeviceComponent.exe
    

    Make sure that the path you specify here matches the path that is set in the device-side project settings.

  7. To add a new device, in the Bundle Input Editor, click on Devices, and then click Add.

  8. Select the device from the list of available devices, and then set the name and platform.

  9. In the Packages included box, select the package that you created on the Device Packages tab.

  10. To save your changes and close the dialog box, choose OK.

See Also

Other Resources

Modification of a Plug-in Project Created Using the Project Wizard