Installing and Configuring your Driver, Using drvlib.lib
User-mode drivers can call functions in drvlib.lib to start the kernel-mode driver and to modify registry keys. The most commonly used functions include:
Initializes drvlib.lib for use with your user-mode driver.
Creates a connection to the Windows NT service control manager and, optionally, creates a service object for the kernel-mode driver.
Opens a connection to the service control manager, creates a kernel-mode driver service for the specified driver, and loads the kernel-mode driver. This function is typically called when DriverProc receives a DRV_INSTALL or DRV_CONFIGURE message.
Closes a connection to the service control manager.
Creates a device subkey under the driver's \Parameters registry key. You should store a device's configuration parameters under this key.
Examines the registry to determine which interrupt numbers and DMA channels are assigned to devices.
Assigns a value to a value name in the registry, under a device's \Parameters key. Use this function to save configuration parameters.
Reads the value associated with a value name, under a device's \Parameters registry key. Use this function to read configuration parameters you have stored in the registry.
Unloads the kernel-mode driver and marks the kernel-mode driver service for deletion. Typically called when DriverProc receives a DRV_REMOVE message.
Other installation and configuration functions provided by drvlib.lib are DrvSaveParametersKey, DrvRestoreParametersKey, DrvDeleteServicesNode, DrvLoadKernelDriver, DrvUnloadKernelDriver, DrvIsDriverLoaded, DrvNumberOfDevices, and DrvSetMapperName.