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

STREAM DRIVER FUNCTIONS

When the Device Manager loads a Stream Driver, it requires that the driver DLL implement all or part of its Device Driver Interface (DDI). This is implemented in the driver’s source file as up to 13 entry points (functions) with the XXX_ prefix in their names where XXX is the prefix for the driver as specified in its registry entries. For example a serial port can use the prefix COM, so COM_Open will be the interface function called when an application opens that serial stream. You can also implement the driver without using a prefix by specifying DEVFLAGS_NAKEDENTRIES in the driver’s flags in its registry entries. A serial driver with that flag would then implement Open instead of COM_Open.

Table 32-2 lists the complete set of Stream Driver interface functions, the corresponding API call, what calls them, whether you have to implement them in a Stream Driver, and the value to return from the stream interface function to indicate to the caller that the function call was successful. Functions indicated as being actioned by a user application can also be called by another driver that is a “wrapper” around the driver.

TABLE 32-2: The Stream Driver Function and API Calls to Action

image

Not all functions are required to load a driver. A minimal set is XXX_Init and XXX_Deinit. Functions tagged as mandatory are required for the driver to load and unload by the Device ...

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