The DRV_CONFIGURE message requests a user-mode multimedia driver to display a dialog box that allows administrators to modify the driver’s hardware configuration parameters.
Parameters
dwDriverID
Driver instance identifier. This is the value returned by the driver in response to the DRV_OPEN message.
hDriver
Driver handle.
uMsg
DRV_CONFIGURE
lParam1
Handle to the parent window the driver should use when creating a configuration dialog box.
lParam2
If not null, specifies the address of a DRVCONFIGINFO structure.
Return Value
The driver should provide one of the following return values:
DRVCNF_CANCEL | The user canceled the configuration dialog box. |
DRVCNF_OK | The configuration operation was successful. |
DRVCNF_RESTART | The configuration operation was successful. The new configuration does not take effect until Windows NT is restarted. |
Comments
The DRV_CONFIGURE message is one of the standard driver messages. A client sends the message by calling the driver’s DriverProc entry point, passing the specified parameter values. Typically, this message is sent by the Control Panel’s Multimedia applet.
Drivers display a dialog box to obtain configuration parameters from the system administrator. Your driver must confirm that the client has Administrator privilege.
Configuration parameters typically include information the kernel-mode driver needs in order to access the hardware, such as an interrupt number, DMA channel, and port address. After obtaining this information from the dialog box, the user-mode driver stores it in the registry, as described in Storing Hardware Configuration Parameters, where it is accessible to the kernel-mode driver.
Drivers receive a DRV_OPEN message before receiving DRV_CONFIGURE.
Some drivers combine installation and configuration operations into one step and perform them upon receipt of either a DRV_INSTALL or a DRV_CONFIGURE message.
If the driver returns DRVCNF_RESTART, you can assume that the caller will display a message telling the administrator to restart Windows NT.
You can assume that the Control Panel’s Multimedia applet will not install a driver that cannot be configured. When installing a driver, the Multimedia applet sends a DRV_CONFIGURE message immediately after sending DRV_INSTALL. If the driver returns DRVCNF_CANCEL in response to DRV_CONFIGURE, the driver is not installed.