KsInitializeDevice function

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

Syntax


NTSTATUS KsInitializeDevice(
  _In_           PDEVICE_OBJECT      FunctionalDeviceObject,
  _In_           PDEVICE_OBJECT      PhysicalDeviceObject,
  _In_           PDEVICE_OBJECT      NextDeviceObject,
  _In_opt_ const KSDEVICE_DESCRIPTOR *Descriptor
);

Parameters

FunctionalDeviceObject [in]

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.

PhysicalDeviceObject [in]

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

NextDeviceObject [in]

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

Descriptor [in, optional]

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

Target platform

Universal

Version

Available in Microsoft Windows XP and later operating systems and DirectX 8.0 and later DirectX versions.

Header

Ks.h (include Ks.h)

Library

Ks.lib

IRQL

PASSIVE_LEVEL

See also

KsInitializeDriver
KsAddDevice
KsCreateDevice
KsTerminateDevice
KSDEVICE
IoCreateDevice
IoAttachDeviceToDeviceStack
DRIVER_OBJECT
DEVICE_OBJECT

 

 

Send comments about this topic to Microsoft

Show: