Export (0) Print
Expand All

ZwLoadDriver routine

The ZwLoadDriver routine loads a driver into the system.

Syntax


NTSTATUS ZwLoadDriver(
  _In_  PUNICODE_STRING DriverServiceName
);

Parameters

DriverServiceName [in]

Pointer to a counted Unicode string that specifies a path to the driver's registry key, \Registry\Machine\System\CurrentControlSet\Services\DriverName, where DriverName is the name of the driver.

Return value

ZwLoadDriver returns STATUS_SUCCESS or an appropriate error NTSTATUS value.

Remarks

ZwLoadDriver dynamically loads a device or file system driver into the currently running system.

Note   If the system is running in safe mode, and the driver fails to load because it is not on the safe mode list, ZwLoadDriver returns STATUS_SUCCESS.

A minifilter should use FltLoadFilter instead of ZwLoadDriver to load a supporting minifilter.

Note  If the call to the ZwLoadDriver function occurs in user mode, you should use the name "NtLoadDriver" instead of "ZwLoadDriver".

Requirements

Version

Available in Windows XP and later versions of Windows.

Header

Wdm.h (include Wdm.h, Ntddk.h, or Ntifs.h)

Library

Ntoskrnl.lib

IRQL

PASSIVE_LEVEL

DDI compliance rules

PowerIrpDDis, HwStorPortProhibitedDDIs

See also

FltLoadFilter
RtlInitUnicodeString
UNICODE_STRING
ZwUnloadDriver

 

 

Send comments about this topic to Microsoft

Show:
© 2014 Microsoft