请输入您要查询的百科知识:

 

词条 ZwLoadDriver
释义

函数原型

NTSTATUS

ZwLoadDriver(

IN PUNICODE_STRING DriverServiceName

);

函数说明

该函数用于在内核模式或驱动程序中动态加载一个已被正确注册的驱动例程

参数说明

DriverServiceName:一个指向驱动程序注册表键Unicode字串的指针,该注册表键位于"\\Registry\\Machine\\System\\CurrentControlSet\\Services\\DriverName"(一般位于HKEY_LOCAL_MACHINE主键下),DriverName是该驱动的注册名

返回值

该函数返回一个 STATUS_SUCCESS 或一个适当的NTSTATUS类型的错误值

注意

ZwLoadDriver 动态地加载一个设备或一个文件系统驱动到当前正在运行的系统.但如果当前的系统正在运行于安全模式,驱动程序会因为不是一个在安全模式驱动加载清单内的程序而失败,函数会返回STATUS_SUCCESS .

使用ZwLoadDriver的设备必须已在当前系统环境中正确注册,或在"\\Registry\\Machine\\System\\CurrentControlSet\\Services\\DriverName"(一般位于HKEY_LOCAL_MACHINE主键下,DriverName是该驱动的注册名)下正确写入键值,否则函数无法被使用.

需求

该函数需运行在Windows XP或更新的版本中

需要包含ntifs.h头文件

DDK帮助文档原文

ZwLoadDriver

The ZwLoadDriver routine loads a driver into the system.

NTSTATUS

ZwLoadDriver(

IN PUNICODE_STRING DriverServiceName

);

Parameters

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

Comments

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

Versions: This routine is available on Microsoft Windows XP and later.

IRQL: PASSIVE_LEVEL

Headers: Declared in ntifs.h. Include ntifs.h.

See Also

FltLoadFilter, RtlInitUnicodeString, UNICODE_STRING, ZwUnloadDriver

随便看

 

百科全书收录4421916条中文百科知识,基本涵盖了大多数领域的百科知识,是一部内容开放、自由的电子版百科全书。

 

Copyright © 2004-2023 Cnenc.net All Rights Reserved
更新时间:2025/3/21 5:00:10