Hello,
I just started porting my legacy class driver to a PnP class driver. To test
the legacy driver, I could just net stop the driver, replace it with the
updated driver and net start to reload the driver. With the new PnP driver,
how do I reload my driver without rebooting the system?
My driver supports various medium changers and tape drives. I have been
using the device management console (devmgmt.msc) to update the driver.
However, I have to reboot the system everytime for the new driver to be
loaded. There’s got to be a simple way of unloading the driver and reloading
it without rebooting the OS. I do have the unload routine. Do I have to
support a certain request to allow the driver to unload and get reloaded
while the OS is running?
Thanks in advance…
Try to disable all your devices (via device manager), OS should unload your
driver. If it doesn’t, net stop in this moment can work. To load it back
just re-enable devices. You can use device manager or DDK enable example
(src\setup\enable). If it works for you and want more efficient way, I wrote
a command line utility when needed it; contact me directly if you’re
interested (free, binary only, as is, no support).
Best regards,
Michal Vodicka
STMicroelectronics Design and Application s.r.o.
[michal.vodicka@st.com, http:://www.st.com]
From: xxxxx@sbcglobal.net[SMTP:xxxxx@sbcglobal.net]
Reply To: xxxxx@lists.osr.com
Sent: Monday, June 10, 2002 7:42 AM
To: xxxxx@lists.osr.com
Subject: [ntdev] How to unload and reload the PnP driver
Hello,
I just started porting my legacy class driver to a PnP class driver. To
test
the legacy driver, I could just net stop the driver, replace it with the
updated driver and net start to reload the driver. With the new PnP
driver,
how do I reload my driver without rebooting the system?
My driver supports various medium changers and tape drives. I have been
using the device management console (devmgmt.msc) to update the driver.
However, I have to reboot the system everytime for the new driver to be
loaded. There’s got to be a simple way of unloading the driver and
reloading
it without rebooting the OS. I do have the unload routine. Do I have to
support a certain request to allow the driver to unload and get reloaded
while the OS is running?
Thanks in advance…
You are currently subscribed to ntdev as: michal.vodicka@st.com
To unsubscribe send a blank email to %%email.unsub%%
Mishka,
I had the same question when I ported my driver to WDM mode. The
solution is to disable all your device instances in the device manager and
the driver will unloaded automatically by OS. Then you can update your
driver and enable the devices again. But this basically works for the
simple ( not layered ) driver that directly control its device.
William
-----Original Message-----
From: Mishka Iakouchev [mailto:xxxxx@sbcglobal.net]
Sent: 2002年6月9日 22:43
To: NT Developers Interest List
Subject: [ntdev] How to unload and reload the PnP driver
Hello,
I just started porting my legacy class driver to a PnP class driver. To test
the legacy driver, I could just net stop the driver, replace it with the
updated driver and net start to reload the driver. With the new PnP driver,
how do I reload my driver without rebooting the system?
My driver supports various medium changers and tape drives. I have been
using the device management console (devmgmt.msc) to update the driver.
However, I have to reboot the system everytime for the new driver to be
loaded. There’s got to be a simple way of unloading the driver and reloading
it without rebooting the OS. I do have the unload routine. Do I have to
support a certain request to allow the driver to unload and get reloaded
while the OS is running?
Thanks in advance…
You are currently subscribed to ntdev as: xxxxx@altigen.com
To unsubscribe send a blank email to %%email.unsub%%
> My driver supports various medium changers and tape drives. I have
been
using the device management console (devmgmt.msc) to update the
driver.
However, I have to reboot the system everytime for the new driver to
be
loaded.
Then something is wrong with your INFs.
Usually, you can start and stop device instances from Device Manager,
this requires a reboot only if the device is essential for system
operation (has a paging file on it or such).
Max
You should be able to unload your driver by using the device manager disable
functionality. If your unload routine is not called it means you have a
device object that’s not deleted or you have IOs pending etc. Make sure that
you handled the PNP IRP_MN_REMOVE IRP. If your unload routine is called but
your driver is still in memory it means you have leaked reference to a
device object or driver object.
–
This posting is provided “AS IS” with no warranties, and confers no rights.
“Mishka Iakouchev” wrote in message
news:xxxxx@ntdev…
>
> Hello,
>
> I just started porting my legacy class driver to a PnP class driver. To
test
> the legacy driver, I could just net stop the driver, replace it with the
> updated driver and net start to reload the driver. With the new PnP
driver,
> how do I reload my driver without rebooting the system?
>
> My driver supports various medium changers and tape drives. I have been
> using the device management console (devmgmt.msc) to update the driver.
> However, I have to reboot the system everytime for the new driver to be
> loaded. There’s got to be a simple way of unloading the driver and
reloading
> it without rebooting the OS. I do have the unload routine. Do I have to
> support a certain request to allow the driver to unload and get reloaded
> while the OS is running?
>
> Thanks in advance…
>
>
>
>
>