The device instance is an abstraction introduced
in DDI 8.
It is a handle that is returned by the
CFG_ADD subfunction of the
entry point as an
and is passed back to the driver as an argument
to all subsequent entry point routines
that are related to this device instance.
Logically, this is the equivalent
to passing the
key to every entry point,
but allows the driver to access static cached information
without incurring the cost of accessing
the resource manager database on every operation.
The driver can store any instance information it needs
idata and access this information as needed.
The kernel itself does not acess the
but instead passes the
idata as an oblique handle.
The device instance corresponds to a specific piece of hardware, whereas the channel (see ``Channel number'') represents a mode of that hardware. For example, a tape device would be represented by a device instance, but different modes (rewind on close, for example) are represented by different channels to that device instance.
When implementing open redirection (``cloning'')
as discussed on the
the cloning device needs a single node,
corresponding to a single
the driver then clones multiple channels
out of that node.