开发者

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

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 o开发者_Go百科f 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?


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.


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


This does the trick for me:

devcon disable <driver>
devcon enable <driver>

Devcon download here: http://support.microsoft.com/kb/311272

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜