TdiRegisterDeviceObject function

The TdiRegisterDeviceObject function notifies a transport's clients that the transport has created a new device object to represent the target of its clients' network I/O requests on a particular transport-to-NIC binding.

Syntax

NTSTATUS TdiRegisterDeviceObject(
  _In_  PUNICODE_STRING DeviceName,
  _Out_ HANDLE          *DevRegistrationHandle
);

Parameters

  • DeviceName [in]
    Pointer to a caller-allocated buffer that contains a Unicode string identifying the transport-created device object.

  • DevRegistrationHandle [out]
    Specifies the caller-supplied location of a variable in which TdiRegisterDeviceObject returns an opaque handle if this call succeeds.

Return value

TdiRegisterDeviceObject returns STATUS_SUCCESS when it has notified all the transport's clients of the registration. Otherwise, it can return STATUS_INSUFFICIENT_RESOURCES. (Because the availability of system resources is dynamic, a subsequent call from the same transport can succeed.)

Remarks

After the transport stack is bound to an underlying NDIS miniport driver, a TDI transport must create a named device object with IoCreateDevice to represent the target for its own clients' network I/O requests on the newly established transport-to-NIC binding. Then, the transport must call TdiRegisterDeviceObject. This causes TDI to call all registered ClientPnPBindingChange routines of the transport's clients with the given DeviceName pointer and with the input PnPOpcode value TDI_PNP_OPCODE_ADD.

A successful caller of TdiRegisterDeviceObject should save the returned value at *DevRegistrationHandle for a subsequent and reciprocal call to TdiDeregisterDeviceObject when the transport tears down the binding. The transport also should save the buffered string at DeviceObject for subsequent calls to TdiRegisterNetAddress and TdiPnPPowerRequest.

For the specifics of calls to IoCreateDevice.

Note   The TDI feature is deprecated and will be removed in future versions of Microsoft Windows. Depending on how you use TDI, use either the Winsock Kernel (WSK) or Windows Filtering Platform (WFP). For more information about WFP and WSK, see Windows Filtering Platform and Winsock Kernel. For a Windows Core Networking blog entry about WSK and TDI, see Introduction to Winsock Kernel (WSK).

 

Requirements

Target platform

Universal

Header

Tdikrnl.h (include TdiKrnl.h)

Library

Tdi.lib

IRQL

< DISPATCH_LEVEL

See also

ClientPnPBindingChange

TdiDeregisterDeviceObject

TdiPnPPowerRequest

TdiRegisterNetAddress

 

 

Send comments about this topic to Microsoft