INF InterfaceInstall32 區段

本節會建立一或多個新的 裝置介面類別。 建立新的類別之後,後續安裝的裝置/驅動程式可以藉由呼叫 IoRegisterDeviceInterface來註冊新裝置介面類別的支援。

[InterfaceInstall32]
 
{InterfaceClassGUID}=install-interface-section[,flags]
...

項目

InterfaceClassGUID
指定 GUID 值,識別新匯出 的裝置介面類別

若要註冊介面類別的實例,裝置的驅動程序必須使用此 GUID 呼叫 IoRegisterDeviceInterface 。 本節中指定的 GUID 值也可以由 INFDDInstall 中的 INF AddInterface 指示詞參考。介面區段

如需如何建立 GUID 的詳細資訊,請參閱 在驅動程式中使用 GUID。 如需系統定義的介面類別 GUIDS,請參閱適當的標頭,例如核心串流介面的 Ks.h

install-interface-section
參考 INF 寫入器定義的區段,可能具有這個 INF 中任何系統定義的延伸模組。

flags
如果指定,此項目必須是零。

備註

當系統中尚未安裝指定的 InterfaceClassGUID 時,該介面類別會安裝為對應的 DDInstall。介面 區段會在裝置安裝期間處理,或當該裝置的驅動程式對 IoRegisterDeviceInterface 進行初始呼叫時。

每個 install-interface-section 名稱在 INF 檔案內必須是唯一的,而且必須遵循定義區段名稱的一般規則。 如需這些規則的詳細資訊,請參閱 INF 檔案的一般語法規則

任何指定的 install-interface-section 都有下列一般形式:

[interface-install-section] | 
[interface-install-section.nt] | 
[interface-install-section.ntx86] | 
[interface-install-section.ntia64] | (Windows XP and later versions of Windows)
[interface-install-section.ntamd64] | (Windows XP and later versions of Windows)
[interface-install-section.ntarm] | (Windows 8 and later versions of Windows)
[interface-install-section.ntarm64] (Windows 10 and later versions of Windows)
 
AddReg=add-registry-section[, add-registry-section] ...
[AddProperty=add-property-section[, add-property-section] ...]  (Windows Vista and later versions of Windows)
[Copyfiles=@filename | file-list-section[, file-list-section] ...]
[DelReg=del-registry-section[, del-registry-section] ...]
[DelProperty=del-property-section[, del-property-section] ...]  (Windows Vista and later versions of Windows)
[BitReg=bit-registry-section[,bit-registry-section]...]
[Delfiles=file-list section[, file-list-section] ...]
[Renfiles=file-list-section[, file-list-section] ...]
[UpdateInis=update-ini-section[,update-ini-section]...]
[UpdateIniFields=update-inifields-section[,update-inifields-section]...]
[Ini2Reg=ini-to-registry-section[,ini-to-registry-section]...]
...

如需 interface-install-section 中專案的詳細資訊,請參閱 INF DDInstall 區段

從 Windows Vista 開始,您可以在 interface-install 區段中加入 INF AddProperty 指示詞來設定裝置介面類別屬性。 您也可以在 interface-install 區段中加入 INF DelProperty 指示 詞,以刪除裝置介面類別屬性。 不過,您應該只使用 AddPropertyDelProperty 指示詞來修改 Windows Vista 或更新版本 Windows 操作系統的裝置介面類別屬性。 針對在 Windows Server 2003、Windows XP 或 Windows 2000 上引進的裝置介面類別屬性,而且具有對應的登錄值專案,您應該繼續使用 INF AddReg 指示 詞和 INF DelReg 指示 詞來設定和刪除裝置介面類別屬性。 這些指導方針適用於系統定義的屬性和自定義屬性。 如需如何使用 AddProperty 指示詞和 DelProperty 指示詞的詳細資訊,請參閱 使用 INF AddProperty 指示詞和 INF DelProperty 指示詞。

AddReg 指示詞會參考在安裝此介面期間,在登錄中設定裝置介面特定資訊的一或多個 add-registry 區段。

此介面類別的登錄信息應該至少包含新 裝置介面類別 的易記名稱,以及開啟和使用這個介面時,較高層級元件所需的任何資訊。

此外,這類 install-interface-section 可能會使用這裡所示的任何選擇性指示詞來指定介面特定的安裝作業。

如需如何使用系統定義的 .nt.ntx86、.ntia64.ntamd64、.ntarm.ntarm64 延伸模組的詳細資訊,請參閱建立多個平臺和操作系統的 INF 檔案

另請參閱

AddProperty

AddReg

BitReg

ClassInstall32

CopyFiles

DDInstall

DDInstall。介面

DelFiles

DelProperty

DelReg

Ini2Reg

IoRegisterDeviceInterface

RenFiles

UpdateIniFields

UpdateInis