Share via


OpenDriver

Opens an instance of an installable driver and initializes the instance using either the driver's default settings or a driver-specific value.

HDRVR OpenDriver(LPCWSTR lpDriverName, LPCWSTR lpSectionName, 
    LONG lParam);
 

Parameters

lpDriverName

Address of a null-terminated, wide-character string that specifies the filename of an installable driver or the name of a registry value associated with the installable driver. (This value must have been previously set when the driver was installed.)

lpSectionName

Address of a null-terminated, wide-character string that specifies the name of the registry key containing the registry value given by the lpDriverName parameter. If lpSectionName is NULL, the registry key is assumed to be Drivers32.

lParam

32-bit driver-specific value. This value is passed as the lParam2 parameter to the DriverProc function of the installable driver.

Return Value

Returns the handle of the installable driver instance if successful or NULL otherwise.

Requirements

**  Windows NT/2000:** Requires Windows NT 3.1 or later.
**  Windows 95/98:** Requires Windows 95 or later.
**  Header:** Declared in Mmsystem.h.
**  Library:** Use Winmm.lib.

See Also

Installable Drivers, Installable Driver Functions