Bewerken

Delen via


Accessing Configuration Information for a Filter Driver

NDIS supports a set of functions that provide access to filter driver registry parameters. Filter drivers can access these parameters during the attach or restart operations or when they are processing a Plug and Play (PnP) notification. For more information about PnP notifications, see Filter Module PnP Event Notifications. For more information about attaching a filter module, see Attaching a Filter Module. For more information about restart operations, see Starting a Filter Module.

Filter drivers call the NdisOpenConfigurationEx function to access the registry settings. If a filter driver obtained the handle in the NdisHandle member of the NDIS_CONFIGURATION_OBJECT structure by calling the NdisFRegisterFilterDriver function, the NdisOpenConfigurationEx function provides a handle to the registry location where the filter driver's configuration parameters are stored. Filter drivers can use the configuration handle until they call the NdisFDeregisterFilterDriver function.

If a filter driver obtained the handle in NdisHandle from the NdisFilterHandle parameter of the FilterAttach function, NdisOpenConfigurationEx provides a handle to the registry location where a filter module's configuration parameters are stored. The filter driver can use the configuration handle until NDIS detaches the filter module and the FilterDetach function returns. If a monitoring filter driver specifies the NDIS_CONFIG_FLAG_FILTER_INSTANCE_CONFIGURATION flag in the Flags member of the NDIS_CONFIGURATION_OBJECT structure, the driver can access the filter module configuration for a specific filter module when there are multiple filter modules that are configured over the same miniport adapter. Modifying filter drivers must not use this flag.

After a driver is done accessing the configuration information, the driver must call the NdisCloseConfiguration function to release the configuration handle and related resources.