Bewerken

Delen via


NdisOpenProtocolConfiguration function (ndis.h)

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.

NdisOpenProtocolConfiguration returns a handle for the registry key in which a protocol driver's per-adapter information is stored.

Syntax

void NdisOpenProtocolConfiguration(
  [out] PNDIS_STATUS  Status,
  [out] PNDIS_HANDLE  ConfigurationHandle,
  [in]  PCNDIS_STRING ProtocolSection
);

Parameters

[out] Status

Pointer to a caller-supplied variable that is set to NDIS_STATUS_SUCCESS or a failure status on return from this function.

[out] ConfigurationHandle

Pointer to a caller-supplied variable in which this function returns the handle to the registry key for the named miniport driver to which the caller will bind itself later. Value entries under this key contain protocol-installed, adapter-specific information.

[in] ProtocolSection

Pointer to a caller-supplied NDIS_STRING type containing a counted string, specified in the system-default character set. This counted string names the NDIS NIC driver, effectively the adapter, for which the per-adapter parameters key in the registry protocol section should be opened. For Windows 2000 and later protocols, this counted string contains Unicode characters. That is, for Windows 2000 and later, NDIS defines the NDIS_STRING type as a UNICODE_STRING type.

This pointer is the SystemSpecific1 input parameter to the caller's ProtocolBindAdapter function.

Return value

None

Remarks

NdisOpenProtocolConfiguration returns a handle that the caller can pass subsequently to the Ndis..Configuration functions to retrieve or store information in the registry.

A protocol driver calls NdisOpenProtocolConfiguration to get a registry key handle to be passed subsequently to other Ndis..Configuration functions, such as NdisRead/WriteConfiguration or NdisOpenConfigurationKeyByName/Index, if its installation file stored adapter-specific configuration information in the protocol section of the registry from which the protocol sets up its bindings.

A protocol can call NdisOpenConfigurationKeyByName or NdisOpenConfigurationKeyByIndex to open any subkey of the registry key for which NdisOpenProtocolConfiguration returns the handle.

Windows 2000 and later protocols call kernel-mode support routines to open their own protocol-specific registry keys. For more information about these support routines, see the Summary of Kernel-Mode Support Routines and Power Management Support Routines.

  • 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.

Requirements

Requirement Value
Header ndis.h (include Ndis.h)
Library Ndis.lib
IRQL PASSIVE_LEVEL

See also