I believe it is correct for AddDevice to call
IoCreateDevice and IoCreateSymbolicLink and then call
IoAttachDeviceToDeviceStack for the AddDevice physical
device object and the IoCreateDevice functional device
object.

But if I need to additionally call IoCreateDevice and
IoCreateSymbolicLink for each physical device found and
passed via IRP_MJ_PNP IRP_MN_START_DEVICE, is it also
necessary to pass those IoCreateDevice functional device
objects to IoAttachDeviceToDeviceStack?

If yes, what physical device argument should be used for
IoAttachDeviceToDeviceStack? IRP_MJ_PNP only passes a
functional device object argument, from the AddDevice call
to IoCreateDevice, not a physical device object.

Thanks.

Re: WDM use of IoCreateDevice by David

David
Fri Sep 05 17:31:12 CDT 2003

Have you read Walter Oney's WDM book 2nd Edition?

"Frank Natoli" <FrankNatoli@worldnet.att.net> wrote in message
news:2b2d01c373f7$c3744840$a001280a@phx.gbl...
> I believe it is correct for AddDevice to call
> IoCreateDevice and IoCreateSymbolicLink and then call
> IoAttachDeviceToDeviceStack for the AddDevice physical
> device object and the IoCreateDevice functional device
> object.
>
> But if I need to additionally call IoCreateDevice and
> IoCreateSymbolicLink for each physical device found and
> passed via IRP_MJ_PNP IRP_MN_START_DEVICE, is it also
> necessary to pass those IoCreateDevice functional device
> objects to IoAttachDeviceToDeviceStack?
>
> If yes, what physical device argument should be used for
> IoAttachDeviceToDeviceStack? IRP_MJ_PNP only passes a
> functional device object argument, from the AddDevice call
> to IoCreateDevice, not a physical device object.
>
> Thanks.



Re: WDM use of IoCreateDevice by Frank

Frank
Fri Sep 05 17:45:02 CDT 2003

No. But have copies of his MSJ articles on the subject,
November 1997 and December 1997. Neither go into the
detail that I request below.
>-----Original Message-----
>Have you read Walter Oney's WDM book 2nd Edition?
>
>"Frank Natoli" <FrankNatoli@worldnet.att.net> wrote in
message
>news:2b2d01c373f7$c3744840$a001280a@phx.gbl...
>> I believe it is correct for AddDevice to call
>> IoCreateDevice and IoCreateSymbolicLink and then call
>> IoAttachDeviceToDeviceStack for the AddDevice physical
>> device object and the IoCreateDevice functional device
>> object.
>>
>> But if I need to additionally call IoCreateDevice and
>> IoCreateSymbolicLink for each physical device found and
>> passed via IRP_MJ_PNP IRP_MN_START_DEVICE, is it also
>> necessary to pass those IoCreateDevice functional device
>> objects to IoAttachDeviceToDeviceStack?
>>
>> If yes, what physical device argument should be used for
>> IoAttachDeviceToDeviceStack? IRP_MJ_PNP only passes a
>> functional device object argument, from the AddDevice
call
>> to IoCreateDevice, not a physical device object.
>>
>> Thanks.
>
>
>.
>

Re: WDM use of IoCreateDevice by David

David
Fri Sep 05 18:43:28 CDT 2003

The book is copyrighted 2003 and is mandatory for WDM supporting hardware
devices. The information is available in the DDK, but the book will make it
easier.

"Frank Natoli" <FrankNatoli@worldnet.att.net> wrote in message
news:251f01c373ff$57da87e0$a301280a@phx.gbl...
> No. But have copies of his MSJ articles on the subject,
> November 1997 and December 1997. Neither go into the
> detail that I request below.
> >-----Original Message-----
> >Have you read Walter Oney's WDM book 2nd Edition?
> >
> >"Frank Natoli" <FrankNatoli@worldnet.att.net> wrote in
> message
> >news:2b2d01c373f7$c3744840$a001280a@phx.gbl...
> >> I believe it is correct for AddDevice to call
> >> IoCreateDevice and IoCreateSymbolicLink and then call
> >> IoAttachDeviceToDeviceStack for the AddDevice physical
> >> device object and the IoCreateDevice functional device
> >> object.
> >>
> >> But if I need to additionally call IoCreateDevice and
> >> IoCreateSymbolicLink for each physical device found and
> >> passed via IRP_MJ_PNP IRP_MN_START_DEVICE, is it also
> >> necessary to pass those IoCreateDevice functional device
> >> objects to IoAttachDeviceToDeviceStack?
> >>
> >> If yes, what physical device argument should be used for
> >> IoAttachDeviceToDeviceStack? IRP_MJ_PNP only passes a
> >> functional device object argument, from the AddDevice
> call
> >> to IoCreateDevice, not a physical device object.
> >>
> >> Thanks.
> >
> >
> >.
> >



Re: WDM use of IoCreateDevice by Walter

Walter
Sun Sep 07 10:36:16 CDT 2003

Frank Natoli wrote:
> No. But have copies of his MSJ articles on the subject,
> November 1997 and December 1997. Neither go into the
> detail that I request below.

Gasp! Tear them up -- they're way out of date.

--
Walter Oney, Consulting and Training
Basic and Advanced Driver Programming Seminars
Check out our schedule at http://www.oneysoft.com