A WAN miniport sets itself to accept TAPI commands in two steps. When the miniport registers with NDIS in its DriverEntry function by calling NdisMRegisterMiniport, it indicates that it requires WAN services by setting the flag NDIS_USE_WAN_WRAPPER in the Reserved member of the NDIS_WAN_MINIPORT_CHARACTERISTICS structure.
Following execution of the DriverEntry function and after MiniportInitialize has been called to complete the initialization of one or more adapters, the NDISWAN driver will make an NdisRequest call to the WAN miniport’s MiniportQueryInformation function, with an OID_WAN_GET_INFO request. A miniport that is TAPI-capable should set the TAPI_PROVIDER bit of the FramingBits member of the NDIS_WAN_INFO structure passed in this call.
The TAPI-capable WAN miniport sets the MaxTransmit member of the NDIS_WAN_INFO structure to the default maximum number of outstanding send packets the miniport will accept. NDIS will hold send packets after this maximum is reached. However, a TAPI-capable miniport can dynamically provide a new send window that is different from this initialization-time default value. When the miniport indicates a line up status to NdisMIndicateStatus, it can provide a new nonzero value for that line by setting the SendWindow passed in the NDIS_MAC_LINE_UP structure. If the miniport passes a SendWindow of zero, NDISWAN uses the default value, MaxTransmit, that was set at initialization time for that line.
As the WAN driver’s MiniportInitialize is called to initialize each adapter it manages, NDISWAN calls NDISTAPI to register each TAPI-capable adapter. This creates an association that NDISTAPI can use to send telephonic requests through NDISWAN to the miniport for specific adapters that have been registered.