Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there any way of making windows reload a driver without reboot?

Tags:

windows

driver

I was wondering - how do windows driver developers test themselves?

Lets' say I'm debugging a nasty problem in a driver I wrote. I want to be able to constantly add traces and logs, modify small parts of code, etc.

Each time I build a version of my driver and get a .sys file I want to deploy on a test-machine, and have a look at a tool like dbgview to understand what's happening. AFAIK, in order for the modifications in code to take place, the only way is to reboot the test server.

This is awful! This means I have to wait a long time between making a minor adjustment in code and being.

Is this really the case? Is there no way of telling windows to dynamically reload my driver?

If not - how do windows driver developers work?? Do they constantly reboot their testing servers in order to see if things worked for them?

like image 814
yonix Avatar asked Mar 03 '11 09:03

yonix


People also ask

How do I restart a driver without rebooting?

Whenever a display issue arises, simply press the Windows + Ctrl + Shift + B keyboard shortcut. When you press those keys simultaneously, the screen will very briefly go blank. You'll also hear a beep before everything reappears. So, don't be alarmed when that happens.

How do you reload a driver?

Update the device driverIn the search box on the taskbar, enter device manager, then select Device Manager. Select a category to see names of devices, then right-click (or press and hold) the one you'd like to update. Select Search automatically for updated driver software. Select Update Driver.

Why do you need to restart after installing drivers?

The driver is an interface to a device and is called by services and other applications on your system, these other apps and services may already have an open call to a device that won't be released until your system is rebooted.


2 Answers

We are using virtual machines to test and debug drivers. Reverting to snapshot is much faster then rebooting and gives you always the same environment.

Also you can stop and replace your driver if it supports unloading: disable device in device manager or stop the driver using sc stop service_name.

like image 181
Sergey Podobry Avatar answered Sep 24 '22 17:09

Sergey Podobry


You can also disable/enable host controller in Device Manager.

like image 41
Mark Avatar answered Sep 24 '22 17:09

Mark