[适用于 KMDF 和 UMDF]
WdfDriverGetRegistryPath 方法检索注册表 服务 树中驱动程序注册表项的路径。
语法
PWSTR WdfDriverGetRegistryPath(
[in] WDFDRIVER Driver
);
参数
[in] Driver
驱动程序的框架驱动程序对象的句柄,由先前调用 WdfDriverCreate 或 WdfGetDriver获取。
返回值
WdfDriverGetRegistryPath 返回指向 NULL 终止的 Unicode 字符串的指针,该字符串表示驱动程序的注册表路径。 如果 驱动程序 句柄无效,则会发生系统 bug 检查。
注解
WdfDriverGetRegistryPath 返回的注册表路径字符串是从驱动程序作为输入接收 DriverEntry 例程的 UNICODE_STRING 结构中获取的。
有关注册表的详细信息,请参阅 Framework-Based 驱动程序 中使用注册表。
例子
下面的代码示例获取注册表 服务 树中驱动程序注册表项的路径。
PWSTR registryPath;
registryPath = WdfDriverGetRegistryPath(driver);
要求
要求 | 价值 |
---|---|
目标平台 | 普遍 |
最低 KMDF 版本 | 1.0 |
最低 UMDF 版本 | 2.0 |
标头 | wdfdriver.h (包括 Wdf.h) |
图书馆 | Wdf01000.sys(KMDF):WUDFx02000.dll (UMDF) |
IRQL | PASSIVE_LEVEL |
DDI 符合性规则 | DriverCreate(kmdf),KmdfIrql(kmdf),KmdfIrql2(kmdf),KmdfIrqlExplicit(kmdf) |