Share via


NdisOpenConfiguration

This function returns a handle for an NDIS network adapter driver's HKEY_LOCAL_MACHINE\Comm\DriverName\Parms registry key.

VOID NdisOpenConfiguration(
OUT PNDIS_STATUS Status, 
OUT PNDIS_HANDLE ConfigurationHandle, 
IN NDIS_HANDLE WrapperConfigurationContext );

Parameters

  • Status
    Pointer to a caller-supplied variable in which this function returns the status of its attempt to open the registry key. Possible return values are the following:

    Value Description
    NDIS_STATUS_SUCCESS The value at ConfigurationHandle is valid.
    NDIS_STATUS_FAILURE The key could not be opened.
  • ConfigurationHandle
    Pointer to a caller-supplied variable in which this function returns a handle to the registry HKEY_LOCAL_MACHINE\Comm\DriverName\Parms key. Value entries under this key are provided by the driver's installation script.

  • WrapperConfigurationContext
    Handle input to the MiniportInitialize function.

Remarks

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

A miniport's installation script must store at least the following configuration information in the registry:

  • The network adapter's I/O bus interface type.
  • The bus number and bus type.
  • The network adapter's adapter ID value, which is equivalent to the PCI DeviceId if the network adapter is on a PCI bus

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

A network adapter driver calls the NdisMSetAttributes or the NdisMSetAttributesEx function to identify the type of I/O bus on which its network adapter 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 the NdisCloseConfiguration function to release the handle obtained from this function and to free any temporary storage that NDIS allocated in the driver's calls to NdisReadConfiguration, NdisReadNetworkAddress, and/or NdisWriteConfiguration.

Requirements

Runs on Versions Defined in Include Link to
Windows CE OS 2.0 and later Ndis.h   Ndislib.lib

Note   This API is part of the complete Windows CE OS package as provided by Microsoft. The functionality of a particular platform is determined by the original equipment manufacturer (OEM) and some devices may not support this API.

See Also

MiniportInitialize, NdisCloseConfiguration, NdisMMapIoSpace, NdisMRegisterInterrupt, NdisMRegisterIoPortRange, NdisMRegisterMiniport, NdisMSetAttributes, NdisMSetAttributesEx, NdisOpenProtocolConfiguration, NdisReadConfiguration, NdisReadNetworkAddress, NdisReadPciSlotInformation, NdisRegisterProtocol, NdisWriteConfiguration

 Last updated on Tuesday, July 13, 2004

© 1992-2000 Microsoft Corporation. All rights reserved.