KsInitializeDevice - NtDoc

Native API online documentation, based on the System Informer (formerly Process Hacker) phnt headers
// ks.h

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

View the official Windows Driver Kit DDI reference

NtDoc

No description available.

Windows Driver Kit DDI reference (nf-ks-ksinitializedevice)

KsInitializeDevice function

Description

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

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.

See also

DEVICE_OBJECT

DRIVER_OBJECT

IoAttachDeviceToDeviceStack

IoCreateDevice

KSDEVICE

KsAddDevice

KsCreateDevice

KsInitializeDriver

KsTerminateDevice