are supposed to create a device object IoCreateDevice which will be a
functional device object[FDO] for the incoming PDO. PDO will be created by a
bus driver whereas FDO will be created by a function driver. Also you are
supposed to attach you device object[FDO] with the incoming device object
[PDO] only through which your driver will be attached into the stack. The
incoming PDO will not have any knowledge about your driver’s dispatch table,
it’s just used for linking your driver with the lower layer driver. The FDO
created by your driver should only be used for further handling. I hope this
helps !!!
"Tim Newsham" wrote:
> My driver requires a control device. I have traditionally made this
> device in DriverEntry with IoCreateDevice and IoCreateSymbolicLink.
> Now I’m trying to register an AddDevice function instead. One thing
> that confuses me is that AddDevice gets called with a device already
> made. Am I supposed to create a device with IoCreateDevice and
> IoCreateSymbolicLink and ignore the device I am given? Am I supposed
> to attach my created device to the device I am given? Am I supposed
> to use the device I am given instead of creating my own device (is the
> created device already set up to use my driver’s dispatch table)?
>
> -Tim
>
