KsInitializeDriver - NtDoc

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

KSDDKAPI NTSTATUS KsInitializeDriver(
  [in]           PDRIVER_OBJECT            DriverObject,
  [in]           PUNICODE_STRING           RegistryPathName,
  [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-ksinitializedriver)

Description

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

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.

RegistryPathName [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.

See also

DEVICE_OBJECT

DRIVER_OBJECT

DriverEntry of AVStream

IoCreateDevice

KSDEVICE_DESCRIPTOR

KSDEVICE_DISPATCH

KSFILTER_DESCRIPTOR

KsInitializeDevice