INF InterfaceInstall32 區段

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

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

Entries

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

要註冊介面類別的實例,裝置的驅動程式必須用此 GUID 呼叫 IoRegisterDeviceInterface 。 本節指定的 GUID 值也可由 INF DDInstall 中的 INF AddInterface 指令引用。介面區。

欲了解更多如何建立 GUID,請參閱 「在驅動程式中使用 GUID」。 關於系統定義介面類別 GUIDS,請參閱適當的標頭,例如 Ks.h 用於核心串流介面。

安裝介面區段
參考 INF 寫入者定義的區段,可能包含任何系統定義的擴充,位於此 INF 的其他地方。

flags
若指定,該條目必須為零。

Remarks

當系統中尚未安裝指定的 InterfaceClassGUID,該介面類別會以對應的 DDInstall 形式安裝。介面區段會在裝置安裝時處理,或該裝置驅動程式首次呼叫 IoRegisterDeviceInterface 時處理。

每個 安裝介面區段 名稱必須在 INF 檔案中唯一,並遵循定義區段名稱的一般規則。 欲了解更多規則資訊,請參閱 INF 檔案的一般語法規則。

任何指定的 安裝介面區段 大致如下:

[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]...]
...

欲了解更多關於 介面安裝章節條目的資訊,請參見 INF DDInstall 章節。

從 Windows Vista 開始,你可以在介面安裝區段中加入 INF AddProperty 指令來設定裝置介面類別屬性。 你也可以在介面安裝區塊中加入 INF DelProperty 指令 ,來刪除裝置介面類別屬性。 不過,你應該只用 AddProperty 或 DelProperty 指令來修改 Windows Vista 或更新版本 Windows 作業系統的新裝置介面類別屬性。 對於在 Windows Server 2003、Windows XP 或 Windows 2000 引入且有相應登錄檔值的裝置介面類別屬性,您應該繼續使用 INF AddReg 指令和 INF DelReg 指令來設定和刪除裝置介面類別屬性。 這些指引適用於系統定義屬性與自訂屬性。 欲了解更多如何使用 AddProperty 指令與 DelProperty 指令,請參閱 使用 INF AddProperty 指令及 INF DelProperty 指令。

AddReg 指令會參考一個或多個 add-registry 區段,在安裝此介面時設定裝置介面專屬資訊於登錄檔中。

關於此介面類別的登錄資訊應至少包含新 裝置介面類別 的友善名稱,以及高層元件在開啟並使用此介面時所需的資訊。

此外,安裝 介面區段 可使用此處所示的任何可選指令來指定介面專屬的安裝操作。

欲了解更多如何使用系統定義的 .nt、 .ntx86、 .ntia64、 .ntamd64、 .ntarm、 .ntarm64 擴充名,請參閱 「為多平台與作業系統建立 INF 檔案」。

也請參閱

AddProperty

AddReg

BitReg

ClassInstall32

複製檔案

DDInstall

DDInstall。介面

德爾檔案

德爾邦特

DelReg

Ini2Reg

IoRegisterDeviceInterface

RenFiles

更新IniFields

更新Inis