A filter driver calls the NdisFRegisterFilterDriver function to register its FilterXxx functions with NDIS.
NDIS_STATUS NdisFRegisterFilterDriver( PDRIVER_OBJECT DriverObject, NDIS_HANDLE FilterDriverContext, PNDIS_FILTER_DRIVER_CHARACTERISTICS FilterDriverCharacteristics, PNDIS_HANDLE NdisFilterDriverHandle );
A handle to a driver-allocated context area where the driver maintains state and configuration information.
A pointer to an NDIS_FILTER_DRIVER_CHARACTERISTICS structure that the filter driver created and initialized with its FilterXxx function entry points.
A pointer to a handle variable. If the call to NdisFRegisterFilterDriver succeeds, NDIS fills this variable with a filter driver handle. The filter driver saves this handle and later passes this handle to NDIS functions, such as NdisFDeregisterFilterDriver, that require a filter driver handle as an input parameter.
Return ValueNdisFRegisterFilterDriver returns one of the following status values:
||NdisFRegisterFilterDriver returns NDIS_STATUS_SUCCESS if it registered the filter driver.|
||The version that is specified in the MajorNdisVersion member of the structure at FilterCharacteristics is invalid.|
||At least one of the members that are specified in NDIS_FILTER_DRIVER_CHARACTERISTICS is invalid.|
||At least one of the input parameters that the driver passed to NdisFRegisterFilterDriver is invalid.|
||NdisFRegisterFilterDriver failed because of insufficient resources.|
||NdisFRegisterFilterDriver returns NDIS_STATUS_FAILURE if none of the preceding values applies.|
Drivers that call NdisFRegisterFilterDriver must be prepared for an immediate call to any of their FilterXxx functions. For more information see Initializing a Filter Driver.
Every filter driver exports a set of FilterXxx functions by setting up the NDIS_FILTER_DRIVER_CHARACTERISTICS structure and calling NdisFRegisterFilterDriver. NDIS copies this structure to the NDIS library's internal storage.
To allow filter drivers to register optional services, NDIS calls the FilterSetOptions function within the context of NdisFRegisterFilterDriver.
After it has registered, a filter driver can later call the NdisSetOptionalHandlers function to change the entry points for optional FilterXxx functions.
Filter drivers call the NdisFDeregisterFilterDriver function to release resources that were previously allocated with NdisFRegisterFilterDriver.
|Minimum supported client||Supported in NDIS 6.0 and later.|
|Header||ndis.h (include Ndis.h)|
|DDI compliance rules||Irql_Filter_Driver_Function, NdisFDeregisterFilterDriver|