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:

DrvLibInit
Initializes drvlib.lib for use with your user-mode driver.
DrvCreateServicesNode
Creates a connection to the Windows NT service control manager and, optionally, creates a service object for the kernel-mode driver.
DrvConfigureDriver
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.
DrvCloseServiceManager
Closes a connection to the service control manager.
DrvCreateDeviceKey
Creates a device subkey under the driver’s \Parameters registry key. You should store a device’s configuration parameters under this key.
GetInterruptsAndDma
Examines the registry to determine which interrupt numbers and DMA channels are assigned to devices.
DrvSetDeviceIdParameter
Assigns a value to a value name in the registry, under a device’s \Parameters key. Use this function to save configuration parameters.
DrvQueryDeviceIdParameter
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.
DrvRemoveDriver
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.