// ndis.h
NDIS_SWITCH_DEREFERENCE_SWITCH_PORT NdisSwitchDereferenceSwitchPort;
NDIS_STATUS NdisSwitchDereferenceSwitchPort(
[in] NDIS_SWITCH_CONTEXT NdisSwitchContext,
[in] NDIS_SWITCH_PORT_ID SwitchPortId
)
{...}
View the official Windows Driver Kit DDI referenceNo description available.
The DereferenceSwitchPort function decrements the Hyper-V extensible switch reference counter for an extensible switch port. The reference counter was incremented through a previous call to ReferenceSwitchPort.
NdisSwitchContext [in]An NDIS_SWITCH_CONTEXT value that contains the handle of the extensible switch module to which the Hyper-V extensible switch extension is attached. When the extension calls NdisFGetOptionalSwitchHandlers, this handle is returned through the NdisSwitchContext parameter.
SwitchPortId [in]An NDIS_SWITCH_PORT_ID value that contains the unique identifier of the extensible switch port for which the extensible switch reference counter is incremented.
If the call succeeds, the function returns NDIS_STATUS_SUCCESS. Otherwise, it returns an NDIS_STATUS_Xxx error code that is defined in Ndis.h.
The extensible switch extension calls DereferenceSwitchPort to decrement the reference counter for an extensible switch port. While the extensible switch reference counter has a nonzero value, the protocol edge of the extensible switch will not issue an object identifier (OID) set request of OID_SWITCH_PORT_DELETE to delete the port.
The extension must call DereferenceSwitchPort if it had previously called ReferenceSwitchPort for an extensible switch port.
NdisFGetOptionalSwitchHandlers