Hi

I'm writting an installator for usb modem (W2k, C++). I can install it and
uninstall.
For installing i'm using UpdateDriverForPlugAndPlayDevices. But after
uninstall i can't install drivers again until i do hardware rescan or plug
out and plug in device. So my question is: how to make rescan for new
hardware programatically with API functions?

thanks in advance
P

Re: How to make rescan for new hardware by Andrew

Andrew
Wed Feb 04 18:20:10 CST 2004

Microsoft Knowledge Base Article - 259697
HOWTO: Force Reenumeration of a Device Tree From an Application
http://support.microsoft.com/support/kb/articles/Q259/6/97.ASP

"siedem" <psiodemak@aiut.com.pl> wrote in message
news:#n8EFwy6DHA.2760@TK2MSFTNGP09.phx.gbl...
> Hi
>
> I'm writting an installator for usb modem (W2k, C++). I can install it and
> uninstall.
> For installing i'm using UpdateDriverForPlugAndPlayDevices. But after
> uninstall i can't install drivers again until i do hardware rescan or plug
> out and plug in device. So my question is: how to make rescan for new
> hardware programatically with API functions?
>
> thanks in advance
> P
>
>



Re: How to make rescan for new hardware by Rohit

Rohit
Wed Feb 04 19:36:00 CST 2004

Use CM_Reenumerate_DevNode(devInst, 0) to Enumerate sub-device tree from of
which "DevInst" is parent. if you use

To locate the root devnode, you can use CM_Locate_DevNode with Null as 2nd
parameter.

--
-Rohit
This posting is provided "AS IS" with no warranties, and confers no rights.


"siedem" <psiodemak@aiut.com.pl> wrote in message
news:#n8EFwy6DHA.2760@TK2MSFTNGP09.phx.gbl...
> Hi
>
> I'm writting an installator for usb modem (W2k, C++). I can install it and
> uninstall.
> For installing i'm using UpdateDriverForPlugAndPlayDevices. But after
> uninstall i can't install drivers again until i do hardware rescan or plug
> out and plug in device. So my question is: how to make rescan for new
> hardware programatically with API functions?
>
> thanks in advance
> P
>
>