NdisOpenConfiguration

VOID
    NdisOpenConfiguration(

        OUT PNDIS_STATUS Status,
        OUT PNDIS_HANDLE ConfigurationHandle,
        IN NDIS_HANDLE WrapperConfigurationContext
        );

NdisOpenConfiguration returns a handle for an NDIS NIC driver’s ..\DriverName\Parameters registry key.

Parameters

Status
Points to a caller-supplied variable in which this function returns the status of its attempt to open the registry key. Possible return values are:
NDIS_STATUS_SUCCESS
The value at ConfigurationHandle is valid.
NDIS_STATUS_FAILURE
The key could not be opened.
ConfigurationHandle
Points to a caller-supplied variable in which this function returns a handle to the registry HKEY_LOCAL_MACHINE\System\CurrentControlSet
\Services\
DriverName\Parameters key. Value entries under this key were provided by the driver’s installation script.
WrapperConfigurationContext
Specifies the handle input to MiniportInitialize.

Comments

With the handle returned by NdisOpenConfiguration, an NDIS miniport can call NdisReadConfiguration one or more times to extract configuration information about its NIC from the registry. A miniport also can call NdisReadNetworkAddress with this handle to retrieve software-configurable network address information that was stored in the registry when its NIC was installed in the current machine.

At a minimum, a miniport’s installation script must store the following configuration information in the registry:

For more information about installing Windows NT drivers, see the Programmer’s Guide.

Drivers of NICs on ISA buses usually get bus-relative configuration parameters for a NIC from the registry with NdisReadConfiguration. Drivers of NICs on other types of I/O buses also can call NdisXxx bus-type-specific configuration functions, such as NdisReadEisaSlotInformation, to get bus-relative NIC-specific configuration parameters suitable for calling functions such as NdisMRegisterInterrupt, NdisMMapIoSpace, and/or NdisMRegisterIoPortRange.

A NIC driver should call NdisMSetAttributes or NdisMSetAttributesEx to identify the type of I/O bus on which its NIC is likely to be found before that driver calls any of the bus-type-specific configuration functions.

After a driver has consumed and, possibly, modified the registry configuration information, the driver must call NdisCloseConfiguration to release the handle obtained from NdisOpenConfiguration and to free any temporary storage NDIS allocated in the driver’s calls to NdisReadConfiguration, NdisReadNetworkAddress, and/or NdisWriteConfiguration.

Callers of NdisOpenConfiguration run at IRQL PASSIVE_LEVEL.

See Also

MiniportInitialize, NdisCloseConfiguration, NdisIMRegisterLayeredMiniport, NdisMMapIoSpace, NdisMRegisterInterrupt, NdisMRegisterIoPortRange, NdisMRegisterMiniport, NdisMSetAttributes, NdisMSetAttributesEx, NdisOpenProtocolConfiguration, NdisReadBindingInformation, NdisReadConfiguration, NdisReadEisaSlotInformation, NdisReadMcaPosInformation, NdisReadNetworkAddress, NdisReadPciSlotInformation, NdisRegisterProtocol, NdisWriteConfiguration