Share via


NdisOpenConfiguration function

Note   NDIS 5. x has been deprecated and is superseded by NDIS 6. x. For new NDIS driver development, see Network Drivers Starting with Windows Vista. For information about porting NDIS 5. x drivers to NDIS 6. x, see Porting NDIS 5.x Drivers to NDIS 6.0.

NdisOpenConfiguration returns a handle for a registry key in which an NDIS NIC driver's advanced configuration parameters are stored.

Syntax

VOID NdisOpenConfiguration(
  _Out_ PNDIS_STATUS Status,
  _Out_ PNDIS_HANDLE ConfigurationHandle,
  _In_  NDIS_HANDLE  WrapperConfigurationContext
);

Parameters

  • Status [out]
    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:

    • NDIS_STATUS_SUCCESS
      NDIS has initialized accessed to the registry key in which the miniport driver's advanced configuration parameters are stored.

    • NDIS_STATUS_FAILURE
      The key could not be opened.

  • ConfigurationHandle [out]
    Pointer to a caller-supplied variable in which this function returns a handle to the registry key in which an NDIS NIC driver's advanced configuration parameters are stored. Value entries under this key were provided by the driver's installation file.

  • WrapperConfigurationContext [in]
    Specifies the handle input to MiniportInitialize.

Return value

None

Remarks

With the handle returned by NdisOpenConfiguration, an NDIS miniport driver can call NdisReadConfiguration one or more times to extract information about a NIC's advanced configuration parameters from the registry. A miniport driver can also 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.

A miniport driver can call NdisOpenConfigurationKeyByName or NdisOpenConfigurationKeyByIndex to open a subkey relative to the key for which NdisOpenConfiguration returned the handle.

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.

Requirements

Target platform

Universal

Version

Not supported for NDIS 6.0 drivers in Windows Vista. Use NdisOpenConfigurationExinstead. Supported for NDIS 5.1 drivers in Windows Vista and Windows XP.

Header

Ndis.h (include Ndis.h)

Library

Ndis.lib

IRQL

PASSIVE_LEVEL

See also

MiniportInitialize

NdisCloseConfiguration

NdisIMRegisterLayeredMiniport

NdisMMapIoSpace

NdisMRegisterInterrupt

NdisMRegisterIoPortRange

NdisMRegisterMiniport

NdisMSetAttributes

NdisMSetAttributesEx

NdisOpenConfigurationKeyByIndex

NdisOpenConfigurationKeyByName

NdisOpenProtocolConfiguration

NdisReadConfiguration

NdisReadEisaSlotInformation

NdisReadNetworkAddress

NdisReadPciSlotInformation

NdisRegisterProtocol

NdisWriteConfiguration

 

 

Send comments about this topic to Microsoft