TdiDispatchCleanup

TDI_STATUS
TdiDispatchCleanup (
IN PDEVICE_OBJECT DeviceObject,
IN PIRP Irp
);

TdiDispatchCleanup calls the TDI driver’s cleanup routine, which closes an address, connection endpoint, or control channel object.

Note The I/O subsystem calls TdiDispatchCleanup if it is closing the last handle for the file object. If it is removing its last reference to the handle, it uses TdiDispatchClose.

Parameters

DeviceObject

Points to the device object that describes the TDI driver.

Irp

Points to the IRP the Windows NT kernel passes to TdiDispatchCleanup. The IRP major function code is IRP_MJ_CLEANUP. For more information about the IRP, see TdiDispatchClose.

Return Value

TdiDispatchCleanup can return the following status codes:

STATUS_INVALID_CONNECTION
STATUS_INVALID_HANDLE
STATUS_PENDING
STATUS_SUCCESS

For more information about status codes, see Part II, Chapter 10.

See Also

TdiDispatchClose