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.