AddDevice Routine for AVStream Minidrivers routine
The vast majority of AVStream minidrivers do not supply their own AddDevice routines. Instead, they use KsAddDevice, the default AddDevice handler installed by KsInitializeDriver. Minidrivers that nonetheless wish to provide their own AddDevice handler should follow the guidelines on this reference page.
Caller-supplied pointer to a DRIVER_OBJECT structure. This is the driver's driver object.
Caller-supplied pointer to a DEVICE_OBJECT structure representing a physical device object (PDO) created by a lower-level driver.
Returns STATUS_SUCCESS or the error code that was returned from the attempt to perform the operation.
The minidriver may call KsCreateDevice from this routine, passing in a nominally optional KSDEVICE_DESCRIPTOR. If KsInitializeDriver is not called, this is the highest level call that will create an AVStream device described by a descriptor.
If the minidriver creates its own FDO and manually attaches itself to the device stack, it should call KsInitializeDevice to create the AVStream device.
If the driver does not provide a KSDEVICE_DESCRIPTOR and yet still creates a device, AVStream creates a default AVStream device. This device contains no filter factories and never dispatches to the minidriver. The minidriver can still instantiate KSFILTERFACTORY structures on the device by calling KsCreateFilterFactory.
To install your own AddDevice handler:
It is highly recommended that AVStream minidrivers use the functionality provided by KsInitializeDriver, rather than override the default AddDevice routine supplied by the class driver.
|Available in Microsoft Windows XP and later operating systems and DirectX 8.0 and later DirectX versions.|