InitFreeDeviceCreateType4 規則 (kmdf)

InitFreeDeviceCreateType4 規則會指定驅動程式在呼叫 WdfDeviceCreate 時遇到錯誤,以及驅動程式從呼叫 WdfControlDeviceInitAllocate 收到WDFDEVICE_INIT結構時,必須呼叫 WdfDeviceInitFree

驅動程式模型:KMDF

測試方法

在編譯時期

執行 靜態驅動程序驗證程式 ,並指定 InitFreeDeviceCreateType4 規則。

使用下列步驟來執行程式碼的分析:
  1. 準備程式代碼 (使用角色類型宣告) 。
  2. 執行靜態驅動程式驗證程式。
  3. 檢視和分析結果。

如需詳細資訊,請參閱 使用靜態驅動程式驗證器尋找驅動程式中的瑕疵

適用於

WdfControlDeviceInitAllocateWdfDeviceCreateWdfDeviceInitFree

另請參閱

InitFreeDeviceCallbackInitFreeDeviceCreateInitFreeDeviceCreateType2PdoInitFreeDeviceCreateType2PdoInitFreeDeviceCallbackPdoInitFreeDeviceCreatePdoInitFreeDeviceCreateType4InitFreeNull