TdiBuildXxx Macros and Functions

This section describes the system-supplied TdiBuildXxx macros, used by kernel-mode clients to set up the TDI_XXX internal device control IRPs they subsequently submit to underlying TDI transport drivers with IoCallDriver.

Parameters to these macros always include pointers or handles to file objects representing addresses, connection endpoints, or control channels already opened with calls to ZwCreateFile. A successful call to ZwCreateFile returns a handle to an open file object, from which the client can obtain a pointer to that file object by calling ObReferenceObjectByHandle.

This section also describes some TdiBuildXxx functions that only kernel-mode clients might call:

  • TdiBuildInternalDeviceControlIrp to allocate an IRP to be passed to a TdiBuildXxx macro and, then, to IoCallDriver when a kernel-mode client makes a request to its underlying transport on its own behalf

  • TdiBuildNetbiosAddressEa to set up a buffered EA describing an address with which the client of a NetBIOS transport can subsequently call ZwCreateFile to open that NetBIOS address

  • TdiBuildNetbiosAddress to set up a NetBIOS address for the client of a NetBIOS transport

For more information about how transport drivers handle the TDI_XXX requests set up by the build-IRP macros, see TDI IOCTLs for Transport Drivers. For more information about the kernel-mode support routines referenced in this section (such as IoCallDriver, ZwCreateFile, and ObReferenceObjectByHandle), see Summary of Kernel-Mode Support Routines.

For more information about ClientPnPXxx handlers and how to register them for Plug and Play and power-state-change notifications, see TDI Client Event and PnP Notification Handlersand TDI Functionssections, respectively.

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).

 

 

 

Send comments about this topic to Microsoft