Bewerken

Delen via


INF DDInstall.COM section

Each per-Models DDInstall.COM section contains one or more INF AddComServer directives that reference other INF-writer-defined sections in an INF file. This section is supported for Windows 11 version 24H2 and later.

[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. For more information see, INF AddComServer directive and for COM servers in general, see COM Clients and Servers.

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

This optional entry specifies one or more other system-supplied INF files that contain sections needed to install this device. If this entry is specified, a Needs entry is also required.

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

This optional entry specifies the section that must be processed during the installation of this device. Typically, the section is a DDInstall.COM section within a system-supplied INF file that is listed in an Include entry. However, it can be any section that is referenced within a DDInstall.COM section.

Remarks

COM binaries are installed into place using the CopyFiles directive in the DDInstall section. Binaries should be installed into a location relative to the driver package's driver store path (for example, DIRID 13). Likewise, device installation writes COM registrations under device relative registry locations.

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 section should have the same platform and operating system decorations as their related DDInstall sections. For example, an install-section-name.ntamd64 section would have a corresponding install-section-name.ntamd64.COM section. The specified DDInstall section must be referenced in a device/models-specific entry under the per-manufacturer Models section of the INF file. The case-insensitive extensions to the install-section-name shown in the formal syntax statement can be inserted into such a DDInstall.COM section name in cross-platform INF files.

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