Supporting Property Sets

Both the minidriver as a whole and individual streams can receive property requests. The minidriver supplies the property sets it supports in the DevicePropertiesArray of HW_STREAM_HEADER. Each stream supplies the property sets it supports in the StreamPropertiesArray of the HW_STREAM_INFORMATION structure for that stream.

The minidriver defines a property set it handles through the KSPROPERTY_SET data structure, which in turn points to the array of KSPROPERTY_ITEM structures, one for each property in the property set. If the GetSupported member of KSPROPERTY_ITEM is TRUE, the minidriver supports getting the property data. If the SetSupported member of KSPROPERTY_ITEM is TRUE, the minidriver supports setting the property data.

Most property support requests are handled automatically by the class driver, using information the minidriver provides in the KSPROPERTY_ITEM structure for the property. For example, if the class driver receives a KSPROPERTY_TYPE_BASICSUPPORT request, it looks up the data type and value ranges in the Values member of KSPROPERTY_ITEM. See KSPROPERTY_ITEM for details. If the minidriver needs to perform custom processing of a support request (which is rare), it may set the SupportHandler member of KSPROPERTY_ITEM to TRUE. The class driver then handles the support request as if it were a property get request. The minidriver can determine the actual type of the request from the Flags member of the property identifier.

The class driver gets or sets minidriver properties by passing a SRB_GET_DEVICE_PROPERTY or SRB_SET_DEVICE_PROPERTY request to the minidriver's StrMiniReceiveDevicePacket routine. The class driver gets or sets stream properties by passing a SRB_GET_STREAM_PROPERTY or SRB_SET_STREAM_PROPERTY request to the stream's StrMiniReceiveStreamControlPacket routine.

The class driver handles many properties on behalf of the minidriver, with an occasional assist from the minidriver through one of the minidriver's callbacks. The minidriver does not define these properties in its property set arrays. For an explanation of how the class driver handles the KSPROPSETID_Pin and KSPROPSETID_Topology property sets, see Supporting Multiple Streams.

Send comments about this topic to Microsoft