The NdisEnumerateFilterModules function enumerates all the filters modules and filter intermediate driver instances in a filter stack.
NDIS_STATUS NdisEnumerateFilterModules( _In_ NDIS_HANDLE NdisHandle, _In_ PVOID InterfaceBuffer, _In_ ULONG InterfaceBufferLength, _Inout_ PULONG BytesNeeded, _Inout_ PULONG BytesWritten );
An NDIS handle that was obtained during caller initialization. For more information about this handle, see Obtaining Pool Handles.
If the handle is an NDIS miniport adapter handle, NDIS returns information about all the interface modules that are currently attached to the miniport adapter, starting with the top-most filter module.
If the handle is an NDIS binding handle, NDIS returns information about all the filter modules that are currently attached to the underlying miniport adapter, starting with the top-most filter module.
If the handle is an NDIS filter module handle, NDIS returns information about all the filter modules that are currently attached to the underlying miniport adapter to which the specified filter module is attached, starting with the top-most filter module.
A pointer to a caller-allocated memory block in which NDIS returns the information for all the filter modules in a filter stack, starting with top-most filter. This buffer contains an NDIS_ENUM_FILTERS structure that is followed by zero or more NDIS_FILTER_INTERFACE structures, one for each filter module in the stack.
The length, in bytes, of the caller-supplied memory block at the InterfaceBuffer member.
A pointer to a caller-supplied variable where NDIS writes the total number of bytes that NDIS requires to successfully return the interface information for all the filters in the filter stack.
A pointer to a caller-supplied variable where NDIS writes the total bytes that NDIS wrote in the memory at InterfaceBuffer.
NdisEnumerateFilterModules returns one of the following status values:
||The operation completed successfully.|
||NdisEnumerateFilterModules failed because the NdisHandle parameter was not a valid NDIS miniport adapter, protocol binding, or filter module handle.|
||NdisEnumerateFilterModules failed because the buffer that was supplied at the InterfaceBuffer parameter was too short for NDIS to return all the information. If a partial result was written at InterfaceBuffer, the value at the BytesWritten parameter contains the length of the partial results.|
An NDIS miniport driver, protocol driver, or filter driver can call the NdisEnumerateFilterModules function to enumerate all the filters in a filter stack.
NdisEnumerateFilterModules returns the list of filter modules and filter intermediate drivers from the top to the bottom of the driver stack. For example, if filter modules (F1 and F2) are attached to miniport adapter (M1) and if F2 is above F1, NdisEnumerateFilterModules returns the list in the following order: F2, F1. If there is also a filter intermediate driver (M2) that is bound to M1, if M2 is above F2, and if another filter (F3) is attached to M2, NdisEnumerateFilterModules returns the filter list in the following order: F3, M2, F2, F1.
|Windows version||Supported in NDIS 6.0 and later.|
|Header||ndis.h (include Ndis.h)|
|DDI compliance rules||Irql_Filter_Driver_Function|