Hi,
I need some clarification on sequence for the IRP_MN_REGINFO.
In the AddDevice(...) of the toaster dispatch routine, the registering with
the WMI happens via
IoWMIRegistrationControl(...) and then saves the WMI information for later
processing when the kernel mode WMI component sends the IRP, yes that comes
via the IRP_MJ_SYSTEM_CONTROL dispatch routine. Now, what I am seeing is
when the devices are added during boot time, the WMI is not yet up. I can
understand it because the WMI service hasn't come up that early in the boot
when the devices are added to the bus.
Now my question, when the IoWMIRegistrationControl(...) is called, who
basically tracks the pending WMI registrations for later processing by the
WMI. I am assuming the IO subsystem would queue the resgitrations for
pushing later to the WMI component or the WMI kernel component would pick
from the I/O queue. There is virtually no documentation on what happens in
the DDK.
I see a topic on wmi registrations here:-
http://www.oneysoft.com/newerr.htm (When to call IoWMIRegistrationControl
[06/12/03]
In brief the summary of the above link.
"It differentiates between windows 2000 and XP. It says in 2000, one could
see a system crash if the WMI registration happens any time before the first
IRP_MN_START_DEVICE.
It also says on XP, a queueing mechanism is implemented which would queue
till it can safely be performed."
Well, the toaster sample has the registration happening in the AddDevice
dispatch routine and I don't see any crashes on windows 2000.
Thanks
Vipin