WdfDriverGetRegistryPath 函式 (wdfdriver.h)

[適用於 KMDF 和 UMDF]

WdfDriverGetRegistryPath 方法會擷取登錄服務樹狀目錄中驅動程式登錄機碼的路徑。

語法

PWSTR WdfDriverGetRegistryPath(
  [in] WDFDRIVER Driver
);

參數

[in] Driver

驅動程式架構驅動程序物件的句柄,由先前呼叫 WdfDriverCreateWdfGetDriver 取得。

傳回值

WdfDriverGetRegistryPath 會傳回代表驅動程式登錄路徑之 NULL 終止 Unicode 字串的指標。 如果 驅動程式 句柄無效,就會發生系統錯誤檢查。

備註

WdfDriverGetRegistryPath 傳回的登錄路徑字串是從驅動程式收到作為其 DriverEntry 例程輸入的UNICODE_STRING結構取得。

如需登錄的詳細資訊,請參閱 在 Framework-Based Drivers 中使用登錄

範例

下列程式代碼範例會取得登錄 服務樹狀 目錄中驅動程式登錄機碼的路徑。

PWSTR  registryPath;

registryPath = WdfDriverGetRegistryPath(driver);

規格需求

需求
目標平台 Universal
最低 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)

另請參閱

UNICODE_STRING

WdfDriverCreate

WdfDriverOpenParametersRegistryKey

WdfGetDriver