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.
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 ...
Get Professional Windows® Embedded Compact 7 now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.