The KsCreateDevice function creates an AVStream device.
KSDDKAPI NTSTATUS KsCreateDevice( PDRIVER_OBJECT DriverObject, PDEVICE_OBJECT PhysicalDeviceObject, const KSDEVICE_DESCRIPTOR *Descriptor, ULONG ExtensionSize, PKSDEVICE *Device );
A pointer to the WDM driver object of the minidriver.
A pointer to the WDM physical device object for the device you want to create under AVStream.
A pointer to a device descriptor that describes the characteristics of the device being created. If the caller does not specify this optional parameter, AVStream creates a device with default characteristics and no associated filter factories.
This parameter contains the size of the device extension. If this is zero, the default extension size is used. If not, it must be at least sizeof (KSDEVICE_HEADER).
A pointer to a memory location that contains the address of the created KSDEVICE structure. Optional.
Returns STATUS_SUCCESS if the device is created successfully. Otherwise, it returns an appropriate error code.
Normally, the minidriver does not call this function directly. Instead, KsCreateDevice is called by the default AddDevice handler, KsAddDevice. Because KsAddDevice makes an internal call to KsCreateDevice, drivers that call KsCreateDevice should not call KsAddDevice separately.
A minidriver that calls KsCreateDevice directly should not use KsInitializeDriver. If the minidriver is not calling KsInitializeDriver, it should instead provide its own AddDevice callback. The minidriver can then call KsCreateDevice from that AddDevice callback.
If no KSDEVICE_DESCRIPTOR is provided, AVStream creates a device with the default characteristics and no associated filter factories. If a KSDEVICE_DESCRIPTOR is supplied and contains a KSDEVICE_DISPATCH table with a create dispatch, the create dispatch is called.
|Windows version||Available in Microsoft Windows XP and later operating systems and DirectX 8.0 and later DirectX versions.|
|Header||ks.h (include Ks.h)|