KsInitializeDriver function

The KsInitializeDriver function initializes the driver object of an AVStream minidriver.

Syntax


NTSTATUS KsInitializeDriver(
  _In_           PDRIVER_OBJECT      DriverObject,
  _In_           PUNICODE_STRING     RegistryPath,
  _In_opt_ const KSDEVICE_DESCRIPTOR *Descriptor
);

Parameters

DriverObject [in]

A pointer to the DRIVER_OBJECT structure for the AVStream driver being initialized. Minidrivers that call KsInitializeDriver should use the driver object passed to DriverEntry by the operating system.

RegistryPath [in]

A pointer to a Unicode string containing the registry path string passed into the minidriver's DriverEntry function by the operating system.

Descriptor [in, optional]

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

Return value

KsInitializeDriver returns STATUS_SUCCESS or an appropriate error code as returned by IoCreateDevice or internal AVStream device initialization routines.

Remarks

This function is typically called from DriverEntry. If the minidriver passes in a device descriptor, AVStream creates a device with the specified characteristics at AddDevice time. Minidrivers that perform device initialization themselves do not necessarily need to call KsInitializeDriver. For more information, see Initializing an AVStream Minidriver.

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

KSDEVICE_DISPATCH
KSFILTER_DESCRIPTOR
KsInitializeDevice
KSDEVICE_DESCRIPTOR
IoCreateDevice
DriverEntry of AVStream
DRIVER_OBJECT
DEVICE_OBJECT

 

 

Send comments about this topic to Microsoft

Show: