TdiBuildInternalDeviceControlIrp
PIRP
TdiBuildInternalDeviceControlIrp (
IN CCHAR IrpSubFunction,
IN PDEVICE_OBJECT DeviceObject,
IN PFILE_OBJECT FileObject,
IN PKEVENT Event,
IN PIO_STATUS_BLOCK IoStatusBlock
);
TdiBuildInternalDeviceControlIrp allocates an IRP for advice control request. The client calls TdiBuildInternalDeviceControlIrp if it does not receive an IRP from a higher network layer. After it returns, the client calls another macro from the TDI library to set up an IRP to contain a request message for the TDI driver.
Parameters
IrpSubFunction
Specifies a code identifying the client request for the TDI driver. TdiBuildInternalDeviceControlIrp sets the IRP minor function code member in the current IRP stack location to IrpSubFunction. The following codes are defined:
| Name | Code |
| TDI_ASSOCIATE_ADDRESS | 0x01 |
| TDI_DISASSOCIATE_ADDRESS | 0x02 |
| TDI_CONNECT | 0x03 |
| TDI_LISTEN | 0x04 |
| TDI_ACCEPT | 0x05 |
| TDI_DISCONNECT | 0x06 |
| TDI_SEND | 0x07 |
| TDI_RECEIVE | 0x08 |
| TDI_SEND_DATAGRAM | 0x09 |
| TDI_RECEIVE_DATAGRAM | 0x0A |
| TDI_SET_EVENT_HANDLER | 0x0B |
| TDI_QUERY_INFORMATION | 0x0C |
| TDI_SET_INFORMATION | 0x0D |
| TDI_ACTION | 0x0E |
DeviceObject
Points to the device object that describes the TDI driver.
FileObject
Points to an address or connection endpoint file object.
Event
Points to the client completion function the I/O subsystem can call when I/O is complete.
IoStatusBlock
Points to the I/O status block at which the TDI driver sets the completion status of the I/O request.
Return Value
TdiBuildInternalDeviceControlIrp returns a pointer to the IRP.
See Also
IoAllocateDeviceIoControl