次の方法で共有


INF DDInstall.COM セクション

各モデルごとの DDInstall.COM セクションには、INF ファイル内の他の INF ライター定義セクションを参照する 1 つ以上の INF AddComServer ディレクティブ が含まれています。 このセクションは、Windows 11 バージョン 24H2 以降でサポートされています。

[install-section-name.COM] |
[install-section-name.nt.COM] |
[install-section-name.ntamd64.COM] |
[install-section-name.ntarm64.COM]

AddComServer = com-server-name, [flags], com-server-install-section
[Include=filename.inf[,filename2.inf]...]
[Needs=inf-section-name[,inf-section-name]...]

At least one AddComServer directive is required to register COM servers.

Entries

AddComServer=com-server-name,flags,com-server-install-section

The AddComServer directive references an INF-writer-defined com-server-install-section elsewhere in the INF file. The AddComServer directive can be used one or more times to register multiple COM servers. 詳細については、「 INF AddComServer ディレクティブ 」および COM サーバー全般については、「 COM クライアントとサーバー」を参照してください。

Include=filename.inf[,filename2.inf]...

この省略可能なエントリは、このデバイスをインストールするために必要なセクションを含む 1 つ以上のシステム提供 INF ファイルを指定します。 If this entry is specified, a Needs entry is also required.

Needs=inf-section-name[,inf-section-name]...

この省略可能なエントリは、このデバイスのインストール中に処理する必要があるセクションを指定します。 通常、このセクションは、システム指定の INF ファイル内の DDInstall.COM セクションで、Include エントリに一覧表示されます。 ただし、DDInstall.COM セクション内で参照される任意のセクションを指定できます。

Remarks

COM binaries are installed into place using the CopyFiles directive in the DDInstall section. バイナリは、ドライバー パッケージの ドライバー ストア パス (DIRID 13 など) を基準とした場所にインストールする必要があります。 同様に、デバイスのインストールでは、デバイスの相対レジストリの場所に COM 登録が書き込まれます。

Clients must call CoRegisterDeviceCatalog on a worker thread before calling CoCreateInstance. Calling CoRegisterDeviceCatalog makes the COM server registrations available in the process for the COM runtime to use.

DDInstall.COM セクションには、関連する DDInstall セクションと同じプラットフォームとオペレーティング システムの装飾が必要です。 たとえば、install-section-name.ntamd64 セクションには、対応する install-section-name.ntamd64.COM セクションがあります。 指定された DDInstall セクションは、INF ファイルの製造元ごとの Models セクションのデバイス/モデル固有のエントリで参照する必要があります。 正式な構文ステートメントに示されている install-section-name の大文字と小文字を区別しない拡張機能は、クロスプラットフォーム INF ファイル内のこのような DDInstall.COM セクション名に挿入できます。

For more information about how to use the system-defined .nt, .ntamd64, and .ntarm64 extensions see Creating INF Files for Multiple Platforms and Operating Systems.

Examples

[Device_Install.COM]
AddComServer   = VendorComServer,, VendorComServer_Inst

[VendorComServer_Inst]
ServerType     = 1 ; in-proc
ServerBinary   = %13%\Vendor_ComServer.dll
AddComClass    = {bb2b85ab-9473-42e5-8d1a-0f01d3879879},, Vendor_ComClass_Inst

[Vendor_ComClass_Inst]
Description    = %Vendor_ComClass_Desc%
ThreadingModel = Neutral

[Strings]
%Vendor_ComClass_Desc%="Vendor Com Server"

See also