摘要 |
A method, computer program product, and data structure is provided overcome excess code development associated with developing device drivers that are hierarchically related and provides standardization to driver developers by listing in the private area of a device object types of file objects, including specific IRP handlers associated therewith, that may be created under that device object to thereby provide a device object context. In like manner, each file object has listed in the private area types of other file objects, again including specific IRP handlers associated therewith, that may be created under that particular file object to thereby provide a file object context. The default handler for a driver object points to a multiplexing function that will process an incoming IRP based on the available context information to "route" the IRP to the appropriate handler. Each file object has reference to a plurality of dispatch function references that are used by the IRP handlers to fulfill a particular request. A request to create a file object will also be validated to assure that only file objects of the appropriate type may be created in hierarchy, again according to the context information.
|