KsInitializeDevice function (ks.h)

The KsInitializeDevice function is called by AVStream to initialize the AVStream device class from within KsCreateDevice.

Syntax

KSDDKAPI NTSTATUS KsInitializeDevice(
  [in]           PDEVICE_OBJECT            FunctionalDeviceObject,
  [in]           PDEVICE_OBJECT            PhysicalDeviceObject,
  [in]           PDEVICE_OBJECT            NextDeviceObject,
  [in, optional] const KSDEVICE_DESCRIPTOR *Descriptor
);

Parameters

[in] FunctionalDeviceObject

A pointer to a DEVICE_OBJECT structure representing the WDM functional device object for the device being initialized.

Normally, this is returned from an IoCreateDevice call. Minidrivers calling this function directly are responsible for calling IoCreateDevice and attaching themselves to the device stack.

[in] PhysicalDeviceObject

A pointer to a DEVICE_OBJECT structure representing the WDM physical device object for the device being initialized.

[in] NextDeviceObject

A pointer to the next DEVICE_OBJECT structure in the device stack as determined by a call to IoAttachDeviceToDeviceStack.

[in, optional] Descriptor

A pointer to a KSDEVICE_DESCRIPTOR structure that describes the characteristics of the device being initialized. If this parameter is NULL, the device is initialized with the default characteristics and has no associated filter factories.

Return value

KsInitializeDevice returns STATUS_SUCCESS if the device was successfully initialized. Otherwise, it returns an appropriate error code.

Remarks

Most minidrivers do not call this function directly. Only call KsInitializeDevice if your minidriver does not use KsInitializeDriver for initialization, handles AddDevice independently, and does not use KsAddDevice or KsCreateDevice in its AddDevice handler.

Requirements

Requirement Value
Minimum supported client Available in Microsoft Windows XP and later operating systems and DirectX 8.0 and later DirectX versions.
Target Platform Universal
Header ks.h (include Ks.h)
Library Ks.lib
IRQL PASSIVE_LEVEL

See also

DEVICE_OBJECT

DRIVER_OBJECT

IoAttachDeviceToDeviceStack

IoCreateDevice

KSDEVICE

KsAddDevice

KsCreateDevice

KsInitializeDriver

KsTerminateDevice