Can User mode Load Kernel mode device?

hi
Is there any way to create PNP device virtual device (Mini driver) from
User mode code?
I saw the Kernel Toaster sample but is there any user mode way to do so?
thanks!

You can create root enumerated devices in user, the devcon sample shows this. The driver is still loaded and running in km.

d

Bent from my phone


From: NtDev mmmailto:xxxxx
Sent: ?4/?29/?2015 4:49 AM
To: Windows System Software Devs Interest Listmailto:xxxxx
Subject: [ntdev] Can User mode Load Kernel mode device?

hi
Is there any way to create PNP device virtual device (Mini driver) from User mode code?
I saw the Kernel Toaster sample but is there any user mode way to do so?
thanks!

— NTDEV is sponsored by OSR Visit the list at: http://www.osronline.com/showlists.cfm?list=ntdev OSR is HIRING!! See http://www.osr.com/careers For our schedule of WDF, WDM, debugging and other seminars visit: http://www.osr.com/seminars To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer</mailto:xxxxx></mailto:xxxxx>

NtDev mm wrote:

Is there any way to create PNP device virtual device (Mini driver)
from User mode code?
I saw the Kernel Toaster sample but is there any user mode way to do so?

Check the “devcon” source code. The “devcon install” option does
exactly this. It pre-installs a driver package, then creates a new PnP
device , then triggers Device Manager to associate the new driver with
the new device.


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.

Hi Thank you this is really helpful
some questions:

I see the installing driver package (SetupDiCreateDeviceInfoList)
Then creating the device (SetupDiCreateDeviceInfo,
SetupDiSetDeviceRegistryProperty and SetupDiCallClassInstaller)
and then updating driver with the created device
using the method UpdateDriverForPlugAndPlayDevicesProto

so if I want to one initial time install the driver I can use the first
method and then for each simulation of plug and unpulg I should use the
other methods?

what is the method to unplug - remove the deivce? I did not find any
relevant flag in the UpdateDriverForPlugAndPlayDevicesProto. and again I
want the driver to be installed all the time and only the deivces should be
added and removed.

In as the virtual driver is simulating a real capture device, I want that
the device remoal will behave just as a physical camera unplug.
how should the following be handled:
using the virtual driver in lync (or any other app) then removing the
device without closing lync - this will require restart of the system,
while if I had a physical camera unplugging it would not required a
restart, what is the difference? what can I do for this scenario?

thanks!

On Wed, Apr 29, 2015 at 7:23 PM, Tim Roberts wrote:

> NtDev mm wrote:
> >
> > Is there any way to create PNP device virtual device (Mini driver)
> > from User mode code?
> > I saw the Kernel Toaster sample but is there any user mode way to do so?
>
> Check the “devcon” source code. The “devcon install” option does
> exactly this. It pre-installs a driver package, then creates a new PnP
> device , then triggers Device Manager to associate the new driver with
> the new device.
>
> –
> Tim Roberts, xxxxx@probo.com
> Providenza & Boekelheide, Inc.
>
>
> —
> NTDEV is sponsored by OSR
>
> Visit the list at: http://www.osronline.com/showlists.cfm?list=ntdev
>
> OSR is HIRING!! See http://www.osr.com/careers
>
> For our schedule of WDF, WDM, debugging and other seminars visit:
> http://www.osr.com/seminars
>
> To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer
>

You cannot simulate physical remove (pnp surprise removal) with a root enumerated device. Uninstall will go through the graceful remove path (query remove->remove) which allows the app to veto the remove if it wants.

d

From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of NtDev mm
Sent: Thursday, April 30, 2015 11:51 AM
To: Windows System Software Devs Interest List
Subject: Re: [ntdev] Can User mode Load Kernel mode device?

Hi Thank you this is really helpful
some questions:

I see the installing driver package (SetupDiCreateDeviceInfoList)
Then creating the device (SetupDiCreateDeviceInfo, SetupDiSetDeviceRegistryProperty and SetupDiCallClassInstaller)
and then updating driver with the created device
using the method UpdateDriverForPlugAndPlayDevicesProto

so if I want to one initial time install the driver I can use the first method and then for each simulation of plug and unpulg I should use the other methods?

what is the method to unplug - remove the deivce? I did not find any relevant flag in the UpdateDriverForPlugAndPlayDevicesProto. and again I want the driver to be installed all the time and only the deivces should be added and removed.

In as the virtual driver is simulating a real capture device, I want that the device remoal will behave just as a physical camera unplug.
how should the following be handled:
using the virtual driver in lync (or any other app) then removing the device without closing lync - this will require restart of the system, while if I had a physical camera unplugging it would not required a restart, what is the difference? what can I do for this scenario?

thanks!

On Wed, Apr 29, 2015 at 7:23 PM, Tim Roberts > wrote:
NtDev mm wrote:
>
> Is there any way to create PNP device virtual device (Mini driver)
> from User mode code?
> I saw the Kernel Toaster sample but is there any user mode way to do so?
Check the “devcon” source code. The “devcon install” option does
exactly this. It pre-installs a driver package, then creates a new PnP
device , then triggers Device Manager to associate the new driver with
the new device.


Tim Roberts, xxxxx@probo.commailto:xxxxx
Providenza & Boekelheide, Inc.


NTDEV is sponsored by OSR

Visit the list at: http://www.osronline.com/showlists.cfm?list=ntdev

OSR is HIRING!! See http://www.osr.com/careers

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

— NTDEV is sponsored by OSR Visit the list at: http://www.osronline.com/showlists.cfm?list=ntdev OSR is HIRING!! See http://www.osr.com/careers For our schedule of WDF, WDM, debugging and other seminars visit: http://www.osr.com/seminars To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer</mailto:xxxxx>

NtDev mm wrote:

I see the installing driver package (SetupDiCreateDeviceInfoList)
Then creating the device (SetupDiCreateDeviceInfo,
SetupDiSetDeviceRegistryProperty and SetupDiCallClassInstaller)
and then updating driver with the created device
using the method UpdateDriverForPlugAndPlayDevicesProto

so if I want to one initial time install the driver I can use the
first method and then for each simulation of plug and unpulg I should
use the other methods?

As long as you’re in the code, check out “devcon enable”, “devcon
disable”, and “devcon restart” (all of which use the same code path).
Disable will force the device instance to shut down and the driver will
unload.

In as the virtual driver is simulating a real capture device, I want
that the device remoal will behave just as a physical camera unplug.
how should the following be handled:
using the virtual driver in lync (or any other app) then removing the
device without closing lync - this will require restart of the system,

Why do you think so?

Your driver plays a big part in this experience. It’s up to your driver
to clean up after itself when a shutdown request comes in, including
cancelling any outstanding requests. As long as you do that, any
streaming apps will get the hint. It’s the same whether it is an
orderly shutdown request or a surprise remove.

while if I had a physical camera unplugging it would not required a
restart, what is the difference? what can I do for this scenario?

The app still has to approve. Even with a surprise remove, the old
driver remains active until all application handles are closed.

The “avshws” sample driver does just what you ask. It’s a virtual
kernel streaming capture driver. Go play with it if you want to see how
apps react.


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.

I just tried with the avshws sample it behaves the same.
stream over lync, try to uninstall the avshws and same restart required
prompt appears.
is there any event the driver gets and any way he can cancel all resources
used by the app?

also what is it that is possible by the toaster bus driver MS published and
it not possible by devcon
when would I want to use the bus driver?

would Bus driver as sample solve what I’m intending to do?

having a bus driver which always exists and he the one adding and removing
the device

On Thu, Apr 30, 2015 at 10:19 PM, Tim Roberts wrote:

> NtDev mm wrote:
> >
> > I see the installing driver package (SetupDiCreateDeviceInfoList)
> > Then creating the device (SetupDiCreateDeviceInfo,
> > SetupDiSetDeviceRegistryProperty and SetupDiCallClassInstaller)
> > and then updating driver with the created device
> > using the method UpdateDriverForPlugAndPlayDevicesProto
> >
> > so if I want to one initial time install the driver I can use the
> > first method and then for each simulation of plug and unpulg I should
> > use the other methods?
>
> As long as you’re in the code, check out “devcon enable”, “devcon
> disable”, and “devcon restart” (all of which use the same code path).
> Disable will force the device instance to shut down and the driver will
> unload.
>
>
> > In as the virtual driver is simulating a real capture device, I want
> > that the device remoal will behave just as a physical camera unplug.
> > how should the following be handled:
> > using the virtual driver in lync (or any other app) then removing the
> > device without closing lync - this will require restart of the system,
>
> Why do you think so?
>
> Your driver plays a big part in this experience. It’s up to your driver
> to clean up after itself when a shutdown request comes in, including
> cancelling any outstanding requests. As long as you do that, any
> streaming apps will get the hint. It’s the same whether it is an
> orderly shutdown request or a surprise remove.
>
>
> > while if I had a physical camera unplugging it would not required a
> > restart, what is the difference? what can I do for this scenario?
>
> The app still has to approve. Even with a surprise remove, the old
> driver remains active until all application handles are closed.
>
> The “avshws” sample driver does just what you ask. It’s a virtual
> kernel streaming capture driver. Go play with it if you want to see how
> apps react.
>
> –
> Tim Roberts, xxxxx@probo.com
> Providenza & Boekelheide, Inc.
>
>
> —
> NTDEV is sponsored by OSR
>
> Visit the list at: http://www.osronline.com/showlists.cfm?list=ntdev
>
> OSR is HIRING!! See http://www.osr.com/careers
>
> For our schedule of WDF, WDM, debugging and other seminars visit:
> http://www.osr.com/seminars
>
> To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer
>

NtDev mm wrote:

I just tried with the avshws sample it behaves the same.
stream over lync, try to uninstall the avshws and same restart
required prompt appears.

Did you really uninstall, or did you disable, as I suggested? It should
be clear that an uninstall cannot complete if the app won’t give up, and
a reboot is the only way to force the app to do that. You’d get the
same thing with a real camera.

is there any event the driver gets and any way he can cancel all
resources used by the app?

The driver always gets involved. The driver will cancel and complete
any open requests, but it’s still up to the application to close the
file handle. You can’t force an application to take action.

also what is it that is possible by the toaster bus driver MS
published and it not possible by devcon
when would I want to use the bus driver?

Writing a bus driver gives you control over when the child devices come
and go. In the path we’ve been discussing, you are using a software bus
driver, and you are subject to its limitations. It can’t simulate a
surprise removal, for example.

would Bus driver as sample solve what I’m intending to do?

We don’t have any idea what you’re intending to do. You have asked
low-level questions about specific details, without giving us a picture
of your overall task. That is a common failure on this forum. You have
leaked out little snippets that imply you want a virtual camera of some
kind, but we don’t know what that has to do with unplugging.

If you want to describe your vision, we can guide you to a good solution.


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.

Thanks Doron! this is one of the most bizarre and unusual things about PnP I knew in years.

So, if I re-enumerate the root-enumerated parent devnode and omit some children - it will not work?


Maxim S. Shatskih
Microsoft MVP on File System And Storage
xxxxx@storagecraft.com
http://www.storagecraft.com
“Doron Holan” wrote in message news:xxxxx@ntdev…
You cannot simulate physical remove (pnp surprise removal) with a root enumerated device. Uninstall will go through the graceful remove path (query remove->remove) which allows the app to veto the remove if it wants.

d

From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of NtDev mm
Sent: Thursday, April 30, 2015 11:51 AM
To: Windows System Software Devs Interest List
Subject: Re: [ntdev] Can User mode Load Kernel mode device?

Hi Thank you this is really helpful

some questions:

I see the installing driver package (SetupDiCreateDeviceInfoList)

Then creating the device (SetupDiCreateDeviceInfo, SetupDiSetDeviceRegistryProperty and SetupDiCallClassInstaller)

and then updating driver with the created device

using the method UpdateDriverForPlugAndPlayDevicesProto

so if I want to one initial time install the driver I can use the first method and then for each simulation of plug and unpulg I should use the other methods?

what is the method to unplug - remove the deivce? I did not find any relevant flag in the UpdateDriverForPlugAndPlayDevicesProto. and again I want the driver to be installed all the time and only the deivces should be added and removed.

In as the virtual driver is simulating a real capture device, I want that the device remoal will behave just as a physical camera unplug.

how should the following be handled:

using the virtual driver in lync (or any other app) then removing the device without closing lync - this will require restart of the system, while if I had a physical camera unplugging it would not required a restart, what is the difference? what can I do for this scenario?

thanks!

On Wed, Apr 29, 2015 at 7:23 PM, Tim Roberts wrote:

NtDev mm wrote:
>
> Is there any way to create PNP device virtual device (Mini driver)
> from User mode code?
> I saw the Kernel Toaster sample but is there any user mode way to do so?

Check the “devcon” source code. The “devcon install” option does
exactly this. It pre-installs a driver package, then creates a new PnP
device , then triggers Device Manager to associate the new driver with
the new device.


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.


NTDEV is sponsored by OSR

Visit the list at: http://www.osronline.com/showlists.cfm?list=ntdev

OSR is HIRING!! See http://www.osr.com/careers

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

— NTDEV is sponsored by OSR Visit the list at: http://www.osronline.com/showlists.cfm?list=ntdev OSR is HIRING!! See http://www.osr.com/careers For our schedule of WDF, WDM, debugging and other seminars visit: http://www.osr.com/seminars To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

Not sure in what state you will omit the children. The only way you get a surprise remove to happen is to answer QDR/BusRelations and do not report a PDO previously reported while the parent is in the started state. A remove->Reenumerate will not do it

From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Maxim S. Shatskih
Sent: Monday, May 04, 2015 10:05 PM
To: Windows System Software Devs Interest List
Subject: Re:[ntdev] Can User mode Load Kernel mode device?

Thanks Doron! this is one of the most bizarre and unusual things about PnP I knew in years.

So, if I re-enumerate the root-enumerated parent devnode and omit some children - it will not work?


Maxim S. Shatskih
Microsoft MVP on File System And Storage
xxxxx@storagecraft.commailto:xxxxx
http://www.storagecraft.com
“Doron Holan” > wrote in message news:xxxxx@ntdev…
You cannot simulate physical remove (pnp surprise removal) with a root enumerated device. Uninstall will go through the graceful remove path (query remove->remove) which allows the app to veto the remove if it wants.

d

From: xxxxx@lists.osr.commailto:xxxxx [mailto:xxxxx@lists.osr.com] On Behalf Of NtDev mm
Sent: Thursday, April 30, 2015 11:51 AM
To: Windows System Software Devs Interest List
Subject: Re: [ntdev] Can User mode Load Kernel mode device?

Hi Thank you this is really helpful
some questions:

I see the installing driver package (SetupDiCreateDeviceInfoList)
Then creating the device (SetupDiCreateDeviceInfo, SetupDiSetDeviceRegistryProperty and SetupDiCallClassInstaller)
and then updating driver with the created device
using the method UpdateDriverForPlugAndPlayDevicesProto

so if I want to one initial time install the driver I can use the first method and then for each simulation of plug and unpulg I should use the other methods?

what is the method to unplug - remove the deivce? I did not find any relevant flag in the UpdateDriverForPlugAndPlayDevicesProto. and again I want the driver to be installed all the time and only the deivces should be added and removed.

In as the virtual driver is simulating a real capture device, I want that the device remoal will behave just as a physical camera unplug.
how should the following be handled:
using the virtual driver in lync (or any other app) then removing the device without closing lync - this will require restart of the system, while if I had a physical camera unplugging it would not required a restart, what is the difference? what can I do for this scenario?

thanks!

On Wed, Apr 29, 2015 at 7:23 PM, Tim Roberts > wrote:
NtDev mm wrote:
>
> Is there any way to create PNP device virtual device (Mini driver)
> from User mode code?
> I saw the Kernel Toaster sample but is there any user mode way to do so?
Check the “devcon” source code. The “devcon install” option does
exactly this. It pre-installs a driver package, then creates a new PnP
device , then triggers Device Manager to associate the new driver with
the new device.


Tim Roberts, xxxxx@probo.commailto:xxxxx
Providenza & Boekelheide, Inc.


NTDEV is sponsored by OSR

Visit the list at: http://www.osronline.com/showlists.cfm?list=ntdev

OSR is HIRING!! See http://www.osr.com/careers

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

— NTDEV is sponsored by OSR Visit the list at: http://www.osronline.com/showlists.cfm?list=ntdev OSR is HIRING!! See http://www.osr.com/careers For our schedule of WDF, WDM, debugging and other seminars visit: http://www.osr.com/seminars To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer


NTDEV is sponsored by OSR

Visit the list at: http://www.osronline.com/showlists.cfm?list=ntdev

OSR is HIRING!! See http://www.osr.com/careers

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer</mailto:xxxxx></mailto:xxxxx></mailto:xxxxx>

Won’t IoInvalidateDeviceState + PNP_DEVICE_FAILED cause SURPRISE_REMOVAL for root-enumerated devices?

Yes

d

Bent from my phone


From: xxxxx@yahoo.commailto:xxxxx
Sent: ?5/?5/?2015 7:57 AM
To: Windows System Software Devs Interest Listmailto:xxxxx
Subject: RE:[ntdev] Can User mode Load Kernel mode device?

Won’t IoInvalidateDeviceState + PNP_DEVICE_FAILED cause SURPRISE_REMOVAL for root-enumerated devices?


NTDEV is sponsored by OSR

Visit the list at: http://www.osronline.com/showlists.cfm?list=ntdev

OSR is HIRING!! See http://www.osr.com/careers

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer</mailto:xxxxx></mailto:xxxxx>

Maxim S. Shatskih wrote:

So, if I re-enumerate the root-enumerated parent devnode and omit
some children - it will not work?

Only the parent bus driver can do that. You do not control the parent.
It is an operating system component, and it does not support this action.

Now, if you mean you want to write a root-enumerated bus driver that
manages its own children, then this absolutely can be done.


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.

xxxxx@yahoo.com wrote:

Won’t IoInvalidateDeviceState + PNP_DEVICE_FAILED cause SURPRISE_REMOVAL for root-enumerated devices?

I haven’t tried it, but I would not expect it to do so.
PNP_DEVICE_FAILED does not mean the device has gone away. A surprise
removal has to originate from the bus driver. IoInvalidateDeviceState
doesn’t involve the bus. It won’t have any idea that the device is
misbehaving.


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.

Surprise removal is overloaded and means two things. Physical removal (the parent reports the stack as missing) and software failure (anyone in the stack reports PNP_DEVICE_FAILED)

d

-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Tim Roberts
Sent: Tuesday, May 5, 2015 9:22 AM
To: Windows System Software Devs Interest List
Subject: Re: [ntdev] Can User mode Load Kernel mode device?

xxxxx@yahoo.com wrote:

Won’t IoInvalidateDeviceState + PNP_DEVICE_FAILED cause SURPRISE_REMOVAL for root-enumerated devices?

I haven’t tried it, but I would not expect it to do so.
PNP_DEVICE_FAILED does not mean the device has gone away. A surprise removal has to originate from the bus driver. IoInvalidateDeviceState doesn’t involve the bus. It won’t have any idea that the device is misbehaving.


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.


NTDEV is sponsored by OSR

Visit the list at: http://www.osronline.com/showlists.cfm?list=ntdev

OSR is HIRING!! See http://www.osr.com/careers

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

Yes, surely, by “omit the children” I meant exactly “do not report them in QDR/BusRelations”.

And, by “reenumerate” I meant IoInvalidateDeviceRelations.

Will the sequence of IoInvalidateDeviceRelations+not reporting a child in QDR/BusRelations work if the parent is a root-enumerated device?

I have some 6years old code of mine which works in such a case, but probably it is an officially unsupported scenario?
“Doron Holan” wrote in message news:xxxxx@ntdev…
Not sure in what state you will omit the children. The only way you get a surprise remove to happen is to answer QDR/BusRelations and do not report a PDO previously reported while the parent is in the started state. A remove->Reenumerate will not do it

From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Maxim S. Shatskih
Sent: Monday, May 04, 2015 10:05 PM
To: Windows System Software Devs Interest List
Subject: Re:[ntdev] Can User mode Load Kernel mode device?

Thanks Doron! this is one of the most bizarre and unusual things about PnP I knew in years.

So, if I re-enumerate the root-enumerated parent devnode and omit some children - it will not work?


Maxim S. Shatskih
Microsoft MVP on File System And Storage
xxxxx@storagecraft.com
http://www.storagecraft.com

“Doron Holan” wrote in message news:xxxxx@ntdev…

You cannot simulate physical remove (pnp surprise removal) with a root enumerated device. Uninstall will go through the graceful remove path (query remove->remove) which allows the app to veto the remove if it wants.

d

From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of NtDev mm
Sent: Thursday, April 30, 2015 11:51 AM
To: Windows System Software Devs Interest List
Subject: Re: [ntdev] Can User mode Load Kernel mode device?

Hi Thank you this is really helpful

some questions:

I see the installing driver package (SetupDiCreateDeviceInfoList)

Then creating the device (SetupDiCreateDeviceInfo, SetupDiSetDeviceRegistryProperty and SetupDiCallClassInstaller)

and then updating driver with the created device

using the method UpdateDriverForPlugAndPlayDevicesProto

so if I want to one initial time install the driver I can use the first method and then for each simulation of plug and unpulg I should use the other methods?

what is the method to unplug - remove the deivce? I did not find any relevant flag in the UpdateDriverForPlugAndPlayDevicesProto. and again I want the driver to be installed all the time and only the deivces should be added and removed.

In as the virtual driver is simulating a real capture device, I want that the device remoal will behave just as a physical camera unplug.

how should the following be handled:

using the virtual driver in lync (or any other app) then removing the device without closing lync - this will require restart of the system, while if I had a physical camera unplugging it would not required a restart, what is the difference? what can I do for this scenario?

thanks!

On Wed, Apr 29, 2015 at 7:23 PM, Tim Roberts wrote:

NtDev mm wrote:
>
> Is there any way to create PNP device virtual device (Mini driver)
> from User mode code?
> I saw the Kernel Toaster sample but is there any user mode way to do so?

Check the “devcon” source code. The “devcon install” option does
exactly this. It pre-installs a driver package, then creates a new PnP
device , then triggers Device Manager to associate the new driver with
the new device.


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.


NTDEV is sponsored by OSR

Visit the list at: http://www.osronline.com/showlists.cfm?list=ntdev

OSR is HIRING!! See http://www.osr.com/careers

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

— NTDEV is sponsored by OSR Visit the list at: http://www.osronline.com/showlists.cfm?list=ntdev OSR is HIRING!! See http://www.osr.com/careers For our schedule of WDF, WDM, debugging and other seminars visit: http://www.osr.com/seminars To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer


NTDEV is sponsored by OSR

Visit the list at: http://www.osronline.com/showlists.cfm?list=ntdev

OSR is HIRING!! See http://www.osr.com/careers

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

> Now, if you mean you want to write a root-enumerated bus driver that

manages its own children, then this absolutely can be done.

Yes, this is what I meant.


Maxim S. Shatskih
Microsoft MVP on File System And Storage
xxxxx@storagecraft.com
http://www.storagecraft.com