OpenDriver function (mmiscapi.h)

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

Syntax

HDRVR OpenDriver(
  [in] LPCWSTR szDriverName,
  [in] LPCWSTR szSectionName,
  [in] LPARAM  lParam2
);

Parameters

[in] szDriverName

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.)

[in] szSectionName

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.

[in] lParam2

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

Requirement Value
Minimum supported client Windows 2000 Professional [desktop apps only],Installable Drivers, Installable Driver Functions
Minimum supported server Windows 2000 Server [desktop apps only]
Target Platform Windows
Header mmiscapi.h (include Mmiscapi.h, Windows.h)
Library Winmm.lib
DLL Winmm.dll

See also

Installable Driver Functions

Installable Drivers