Bewerken

Delen via


KsPropertyHandler function (ks.h)

Drivers call KsPropertyHandler function for IRP handling.

Syntax

KSDDKAPI NTSTATUS KsPropertyHandler(
  [in] PIRP                 Irp,
  [in] ULONG                PropertySetsCount,
  [in] const KSPROPERTY_SET *PropertySet
);

Parameters

[in] Irp

Specifies the IRP with the property request being handled.

[in] PropertySetsCount

Specifies the number of property sets being passed.

[in] PropertySet

Points to an array of KSPROPERTY_SET structures. The driver should provide one structure for each property set it wants KsPropertyHandler to handle.

Return value

The KsPropertyHandler function returns STATUS_SUCCESS if successful, or an error specific to the property being handled if unsuccessful. The function sets the IRP->IO_STATUS_BLOCK.Information member, either through setting it to zero because of an internal error, or through a property handler setting it. The function does not set the lrp->IoStatus.Status member nor does it complete the IRP.

Remarks

KsPropertyHandler responds to all property identifiers defined by the sets, and can only be called at PASSIVE_LEVEL.

Each KSPROPERTY_SET entry contains a pointer to an array of KSPROPERTY_ITEM structures in its PropertyItem member. For driver-specific processing, KsPropertyHandler hands off each request to one of the driver-supplied callbacks within PropertyItem. KsPropertyHandler takes care of any IRP processing required.

KsPropertyHandler does not use the FastIoTable member of its KSPROPERTY_SET structure. If the driver needs to support Fast I/O handling of requests, the same KSPROPERTY_SET structure should be passed to the KsFastPropertyHandler routine.

The owner of the property sets can perform prefiltering or postfiltering of property handling. Basic property structure access exceptions are handled by the KsPropertyHandler function, though cleanup for specific exceptions must be covered by the property handler.

KsPropertyHandler places a pointer to the relevant KSPROPERTY_SET structure in the Irp->Tail.Overlay.DriverContext parameter in the IRP. The minidriver can use the KSPROPERTY_SET_IRP_STORAGE macro, defined in ks.h, to access this pointer.

Requirements

Requirement Value
Target Platform Universal
Header ks.h (include Ks.h)
Library Ks.lib

See also

KsFastPropertyHandler

KsPropertyHandlerWithAllocator