TdiBuildQueryInformation

VOID
TdiBuildQueryInformation (
IN PIRP Irp,
IN PDEVICE_OBJECT DeviceObject,
IN PFILE_OBJECT FileObject,
IN PVOID CompletionRoutine,
IN PVOID Context,
IN UINT QueryType,
IN PMDL MdlAddress
);

TdiBuildQueryInformation builds an IRP containing a TDI_QUERY_INFORMATION request message. It sets up the request message in the minor function code member of the I/O stack location and sets IRP_MJ_INTERNAL_DEVICE_CONTROL as a major function code.

Parameters

Irp

Points to the I/O stack location for the kernel-mode client IRP. The current stack location must point to the location in which TdiBuildQueryInformation places the parameter list. IRP members related to the query information request are:

IRP Component Meaning
IoStatus.Status Specifies the final status of the query information request.
IoStatus.Information Contains the number of data bytes the driver receives.
IrpSp->MajorFunction Specifies IRP_MJ_INTERNAL_DEVICE_CONTROL.
IrpSp->MinorFunction Specifies TDI_QUERY_INFORMATION.
IrpSp->FileObject Points to an address, connection endpoint, or control channel file object.
MdlAddress Points to a chain of MDLs describing the buffer to contain information that the internal driver query information function writes.
IrpSp->Parameters Points to a TDI_REQUEST_KERNEL_QUERY_INFORMATION structure containing the query type for a kernel-mode client request. For query types, see the description of TDI_QUERY_INFORMATION.

DeviceObject

Points to the device object that describes the TDI driver.

FileObject

Points to an address, connection endpoint, or control channel file object.

CompletionRoutine

Points to the client completion function the I/O subsystem can call when I/O is complete. This parameter must be NULL if the I/O subsystem calls no completion function.

Context

Points to the context the client associates with its completion function.

QueryType

Specifies the query type (see TDI_QUERY_INFORMATION).

MdlAddress

Points to the MDL chain describing the data the internal TDI driver query information function writes.

See Also

TDI_QUERY_INFORMATION, TDI_REQUEST_KERNEL_QUERY_INFORMATION