Prev: Which Enhanced USB Controller port is a device connected to?
Next: WDK 7600 missing x64 for XP??
From: Ilya Konstantinov on 14 Sep 2009 14:34 How does Windows know when to display the "Your new hardware is installed and ready to use" popup balloon? For example, imagine a heavy composite USB device with many function drivers, the PnP system never knowing whether those function drivers would be the parent to even more function drivers... Is there simply a timeout (like, after the last DBT_DEVICEARRIVAL fires and no more DBT_DEVNODES_CHANGED are fired), after which Windows assumes everything is settled and its safe to display this popup message?
From: Maxim S. Shatskih on 15 Sep 2009 06:34 > How does Windows know when to display the "Your new hardware is > installed and ready to use" popup balloon? For example, imagine a > heavy composite USB device with many function drivers Probably when there is no uninstalled devnodes left in the tree? -- Maxim S. Shatskih Windows DDK MVP maxim(a)storagecraft.com http://www.storagecraft.com
From: Ilya on 15 Sep 2009 08:05 On Sep 15, 1:34 pm, "Maxim S. Shatskih" <ma...(a)storagecraft.com.no.spam> wrote: > > How does Windows know when to display the "Your new hardware is > > installed and ready to use" popup balloon? For example, imagine a > > heavy composite USB device with many function drivers > > Probably when there is no uninstalled devnodes left in the tree? The usermode PnP notification facilities (WM_DEVICECHANGE, RegisterDeviceNotification) don't have any such event. (Of course, one may poll for this by enumerating the CM tree after each DBT_DEVNODES_CHANGED.) And anyway, for USB mass storage devices, you'd be left with no uninstalled devnodes as soon as the USBSTOR driver loads. Then, the FDO will get IRP_MN_QUERY_DEVICE_RELATIONS and this will result in more uninstalled devnodes (the disks -> the volumes). So how will Windows know when no uninstalled devnodes will be created? -- when eventually all query-relations return zero new child devices? And more importantly, how do I know this from a usermode program? :)
From: Mike [MSFT] on 15 Sep 2009 16:10 When the balloon is displayed is slightly different for different versions of Windows. But primarily if you want to know when installation is done you can call CMP_WaitNoPendingInstallEvents (http://msdn.microsoft.com/en-us/library/ms789525.aspx). That is a good approximation for when the finish balloon is displayed. -Mike "Ilya" <ilya.konstantinov(a)gmail.com> wrote in message news:dc582d9c-0daa-4e74-a7bd-cba2c8283a87(a)h30g2000vbr.googlegroups.com... > On Sep 15, 1:34 pm, "Maxim S. Shatskih" > <ma...(a)storagecraft.com.no.spam> wrote: >> > How does Windows know when to display the "Your new hardware is >> > installed and ready to use" popup balloon? For example, imagine a >> > heavy composite USB device with many function drivers >> >> Probably when there is no uninstalled devnodes left in the tree? > > The usermode PnP notification facilities (WM_DEVICECHANGE, > RegisterDeviceNotification) don't have any such event. > (Of course, one may poll for this by enumerating the CM tree after > each DBT_DEVNODES_CHANGED.) > > And anyway, for USB mass storage devices, you'd be left with no > uninstalled devnodes as soon as the USBSTOR driver loads. Then, the > FDO will get IRP_MN_QUERY_DEVICE_RELATIONS and this will result in > more uninstalled devnodes (the disks -> the volumes). > > So how will Windows know when no uninstalled devnodes will be created? > -- when eventually all query-relations return zero new child devices? > And more importantly, how do I know this from a usermode program? :)
From: Ilya on 16 Sep 2009 08:11 On Sep 15, 11:10 pm, "Mike [MSFT]" <jlongh...(a)hotmail.com> wrote: > When the balloon is displayed is slightly different for different versions > of Windows. But primarily if you want to know when installation is done you > can call CMP_WaitNoPendingInstallEvents > (http://msdn.microsoft.com/en-us/library/ms789525.aspx). That is a good > approximation for when the finish balloon is displayed. Mike (and Maxim, as always :), thanks a lot!
|
Pages: 1 Prev: Which Enhanced USB Controller port is a device connected to? Next: WDK 7600 missing x64 for XP?? |