O'Reilly logo

Professional Windows® Embedded Compact 7 by Thierry Joubert, David Jones, Samuel Phung

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

A SIMPLE STREAM DRIVER PROJECT

To create a new stream driver project, you could create a new DLL subproject in Platform Builder and work though adding all of the required code. You could also copy an existing sample project to your SubProjects folder and include it, as explained in this section. Or you could use a Project Wizard to generate the driver files. In the next section, the structure and content of a Stream Driver project is covered in detail. A subsequent section in this chapter focuses on using a wizard. In this section you look at the sample driver provided in Compact 7. This is in $(_WINCEROOT)\platform\BSPTemplate\src\drivers\streamdriver.

1. Copy that folder into your operating system SubProjects folder.

2. Add it to your subprojects as follows:

i. Right-click on SubProjects in Solution Explorer.

ii. Choose Add Existing SubProject.

iii. Browse to the added folder, typically in (for example):

$(_WINCEROOT )\OSDesigns\MyOS\MyOS\StreamDriver

iv. Select the sources file in that folder.

3. Look at the .cpp and registry files. This driver is a shell for a stream driver with significant details about each function. Its registry is configured so that the driver is loaded at startup.

4. Try building the driver; it should fail. If so, add the following includes directive at the bottom of this project’s sources file and rebuild. To edit the project sources file double-click on the subproject in Solution Explorer.

INCLUDES= \ $(_PUBLICROOT)\COMMON\SDK\INC; \ $(_PUBLICROOT)\COMMON\DDK\INC; ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required