ADSDriverLaunch is a simple wrapper application around the ActivateDevice API. It can be used to load a driver without requiring a system restart and could be the basis for a feature that dynamically loads a driver when needed in your own application.
The driver to be launched must already have its necessary registry keys in place and the subkey containing the driver information should be passed to ADSDriverLaunch as a command-line parameter.
For example, if you want to load the Serial Mouse Driver at run time wihtout having to restart your system you would run the following:
This, of course, assumes that the correct registry entries exist and that sermouse.dll is in the Windows folder.
Key APIs Used
RegOpenKeyEx RegQueryValueEx ActivateDevice
Lines of Code: 48
Source Download Rev. 1 - March 7, 03 (9k zip) modified March 31, 02 (ctacke) - added key APIs and LOC