NdisIfFreeNetLuidIndex function (ndis.h)

The NdisIfFreeNetLuidIndex function frees a network interface NET_LUID index that was previously allocated by a call to the NdisIfAllocateNetLuidIndex function.

Syntax

NDIS_STATUS NdisIfFreeNetLuidIndex(
       NET_IFTYPE ifType,
  [in] UINT32     NetLuidIndex
);

Parameters

ifType

The interface type that the index was allocated for. The caller must provide the same value that it used when it allocated the NET_LUID index with NdisIfAllocateNetLuidIndex. For a list of interface types, see NDIS Interface Types.

[in] NetLuidIndex

The NET_LUID index value that NDIS should free. This index was allocated in a previous call to NdisIfAllocateNetLuidIndex.

Return value

NdisIfFreeNetLuidIndex returns one of the following values:

Return code Description
NDIS_STATUS_SUCCESS
The operation completed successfully.
DIS_STATUS_INVALID_PARAMETER
NdisIfFreeNetLuidIndex failed because the NetLuidIndex parameter specified an index that was not allocated for the type that the IfType parameter specified.
 

If the call to NdisIfFreeNetLuidIndex fails, the interface provider should remove any information that it saved in persistent storage that is related to the index. Removing the information will ensure that the provider does not keep trying to free an index that is already freed after the computer restarts.

Remarks

NDIS interface providers call the NdisIfFreeNetLuidIndex function to free a NET_LUID index. The interface provider should free the NET_LUID index only if the interface will not be used anymore on the local computer.

NdisIfFreeNetLuidIndex returns a previously allocated NET_LUID index to NDIS for possible reallocation to another interface. The caller must pass in the same interface type at IfType that it used when it called the NdisIfAllocateNetLuidIndex function to allocate the NET_LUID index.

The provider should not use the freed NET_LUID index or the associated NET_LUID value in any other NDIS function calls after it calls NdisIfFreeNetLuidIndex.

Requirements

Requirement Value
Minimum supported client Supported in NDIS 6.0 and later.
Target Platform Desktop
Header ndis.h (include Ndis.h)
Library Ndis.lib
IRQL PASSIVE_LEVEL
DDI compliance rules Irql_Interfaces_Function(ndis)

See also

NET_LUID

NdisIfAllocateNetLuidIndex