I'm playing about with one of the kernel driver examples in the Win7 DDK. I can modify compile and build my *.sys file. I can install it too with its INF (using device manager or devcon) or using the Service control manager directly. When I make the next change though and generate an updated *.sys file I seem to get a conflict between this new file and my now stopped driver (I've tried using Servcie Control Manager 'stop' and 'delete service' etc). If I reboot, I can install the new driver and run it fine. Similarly, if I choose uninstall in Device Manager, Windows prompts me to reboot.
So, how can one easily test incremental modifications to a kernal driver easily? Thanks
To unload a kernel module, we use the rmmod (remove module) command. The following example will unload or remove the speedstep-lib. ko module.
In order to prevent kernel modules loading during boot, the module name must be added to a configuration file for the "modprobe" utility. This file must reside in /etc/modprobe. d . Ensure the module is not configured to get loaded in either /etc/modprobe.
Kernel driver code that is used for development, testing, or manufacturing might include dangerous capabilities that pose a security risk. This dangerous code should never be signed with a certificate that is trusted by Windows.
Looking at the Setup API logs might be a good place to start: http://msdn.microsoft.com/en-us/library/ff550887%28v=VS.85%29.aspx
If devcon prompts for a reboot, you could look at the code in the DDK, debug why it's asking and dig into the issue that way as well.
Yes. sc stop <driver name>
should stop your driver. If your driver is associated with a particular PnP devnode, it should be unloaded after the devnode is removed.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With