Stream Class Child Devices

This section applies to Microsoft Windows Server 2003 and earlier operating systems only if DirectX 9.0 or later is installed on that platform.

If your stream class device places an Enum branch in the registry under its device key, stream class behaves as a bus enumerator for the device, creating a child device for each key in the Enum branch.

In the AddReg section of the driver's INF file, the vendor supplies a value pnpid of type REG_SZ for each entry under Enum. Stream class uses this string value to construct a Plug and Play (PnP) hardware ID for each individual child device.

In releases earlier than DirectX 9.0, stream class creates a child device hardware ID of the form "AVStream\<pnpid>" (where <pnpid> is the value of pnpid for the specific device).

For example, the vendor specifies the following in the AddReg section of the INF file:

[MyTVDevice.AddReg]
HKR,"ENUM\CrossbarDevice",pnpid,,"MyCrossbar"
HKR,"ENUM\TunerDevice",pnpid,,"MyTuner"

Accordingly, stream class creates two child devices with the following device IDs:

Stream\MyCrossbar

Stream\MyTuner

To resolve possible ambiguity from two different child devices specifying the same pnpid value, DirectX 9.0 and later change the IDs reported for each of the child devices. For each hardware ID reported by the parent device, stream class creates an ID for the child device of the following form:

Stream\<pnpid>#<modified parent hardware ID>

The modified parent hardware ID is the parent hardware ID with each backslash (\) character replaced by the number sign (#).

If the resulting string is too long, stream class terminates the ID string at MAX_DEVICE_ID_LEN characters, including the NULL terminator. In Windows Server 2003, this limit is set to 200 characters in cfgmgr32.h.

For example, a parent device reports the following hardware IDs:

PCI\VEN_XXXX&DEV_YYYY&SUBSYS_ZZZZZZZZ&REV_VV

PCI\VEN_XXXX&DEV_YYYY&SUBSYS_ZZZZZZZZ

For a device with a pnpid key of MyCrossbar, stream class creates the following child device hardware IDs:

Stream\MyCrossbar#PCI#VEN_XXXX&DEV_YYYY&SUBSYS_ZZZZZZZZ&REV_VV

Stream\MyCrossbar#PCI#VEN_XXXX&DEV_YYYY&SUBSYS_ZZZZZZZZ

Stream class uses the same process for compatible IDs reported by the parent device. Stream class creates a compatible ID for the child device of the form:

Stream\<pnpid>#<modified parent compatible ID>

The name modification and length rules for compatible IDs are identical to those for hardware IDs.

For example, if the parent device described previously reports the following compatible IDs:

PCI\VEN_XXXX&DEV_YYYY&REV_VV

PCI\VEN_XXXX&DEV_YYYY

PCI\VEN_XXXX&CC_ZZZZZZ

PCI\VEN_XXXX&CC_ZZZZ

PCI\VEN_XXXX

PCI\CC_ZZZZZZ

PCI\CC_ZZZZ

The MyCrossbar child device would report through stream class the following compatible IDs:

Stream\MyCrossbar#PCI#VEN_XXXX&DEV_YYYY&REV_VV

Stream\MyCrossbar#PCI#VEN_XXXX&DEV_YYYY

Stream\MyCrossbar#PCI#VEN_XXXX&CC_ZZZZZZ

Stream\MyCrossbar#PCI#VEN_XXXX&CC_ZZZZ

Stream\MyCrossbar#PCI#VEN_XXXX

Stream\MyCrossbar#PCI#CC_ZZZZZZ

Stream\MyCrossbar#PCI#CC_ZZZZ

Stream\MyCrossbar

Note In DirectX 9.0 and later, the legacy hardware ID, Stream\<pnpid>, is still reported as the lowest rank compatible ID. As a result, legacy drivers continue to work unmodified on these platforms. However, as of the DirectX 9.0 release, Microsoft recommends that vendors writing new or revised drivers that leverage the stream class bus enumerator use the new hardware ID formats. Drivers can support platforms running earlier versions of stream class by including the old ID in the compatible IDs list in the INF file.


Send comments about this topic to Microsoft