KsFastMethodHandler function (ks.h)

The KsFastMethodHandler function handles fast methods requested through IOCTL_KS_METHOD. It responds to all method identifiers defined by the sets that are also contained in the fast I/O list. This function can only be called at PASSIVE_LEVEL.

Syntax

KSDDKAPI BOOLEAN KsFastMethodHandler(
  [in]      PFILE_OBJECT       FileObject,
  [in]      PKSMETHOD          Method,
  [in]      ULONG              MethodLength,
  [in, out] PVOID              Data,
  [in]      ULONG              DataLength,
  [out]     PIO_STATUS_BLOCK   IoStatus,
  [in]      ULONG              MethodSetsCount,
  [in]      const KSMETHOD_SET *MethodSet
);

Parameters

[in] FileObject

Specifies the file object on which the request was made.

[in] Method

Specifies the original method parameter. This will always be on FILE_LONG_ALIGNMENT, but may not be on FILE_QUAD_ALIGNMENT.

[in] MethodLength

Specifies the length indicated by the caller of the method parameter.

[in, out] Data

Specifies the original unaligned data parameter.

[in] DataLength

Specifies the length indicated by the caller of the data parameter.

[out] IoStatus

Specifies an aligned structure that is used to return error status and information.

[in] MethodSetsCount

Indicates the number of method set structures being passed.

[in] MethodSet

Specifies the pointer to the list of method set information.

Return value

The KsFastMethodHandler function returns TRUE if the request is handled, or FALSE if the request is not handled. If the request is not handled, an IRP is generated. If the request was handled, the function sets the IoStatus->Information element to zero because of an internal error or the element is set by a method handler. The method handler also sets the IoStatus->Status field when the method is handled.

Remarks

The owner of a method set can perform prefiltering or postfiltering of the method handling using the KsFastMethodHandler and KsMethodHandler functions. The KsFastMethodHandler function is used to process requests made through the fast I/O dispatch interface for Device Control. It is only used to process requests that can be fulfilled quickly. The Wait parameter of the fast I/O function is not passed and assumed to be TRUE.

Requirements

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

See also

KsMethodHandler