NdisOpenConfigurationKeyByName function (ndis.h)

The NdisOpenConfigurationKeyByName function opens a named subkey of a given open registry key that is designated by a caller-supplied handle.

Syntax

void NdisOpenConfigurationKeyByName(
  [out] PNDIS_STATUS Status,
  [in]  NDIS_HANDLE  ConfigurationHandle,
  [in]  PNDIS_STRING SubKeyName,
  [out] PNDIS_HANDLE SubKeyHandle
);

Parameters

[out] Status

A 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 one of the following:

NDIS_STATUS_SUCCESS

NDIS has initialized accessed to the subkey specified by SubKeyName .

NDIS_STATUS_FAILURE

The key could not be opened.

[in] ConfigurationHandle

The handle to a registry key for which a subkey should be opened. Typically, ConfigurationHandle is returned by the NdisOpenConfigurationEx function.

[in] SubKeyName

A pointer to an NDIS_STRING type containing a caller-supplied, counted string in the system-default character set that specifies the name of the registry subkey to open. For Microsoft Windows 2000 and later drivers, this string contains Unicode characters. That is, for Windows 2000 and later, NDIS defines the NDIS_STRING type as a UNICODE_STRING type.

[out] SubKeyHandle

A pointer to a caller-supplied variable in which this function returns a handle to the opened subkey if this call is successful.

Return value

None

Remarks

NdisOpenConfigurationKeyByName allows a driver to access configuration information that is stored in a named subkey in the registry.

Note that the ConfigurationHandle passed in to NdisOpenConfigurationKeyByName can be any valid handle to a registry key already opened by the caller. NdisOpenConfigurationKeyByName returns configuration information for subkeys relative to any valid ConfigurationHandle .

After a driver has consumed and, possibly, modified the registry configuration information, it must call the NdisCloseConfiguration function to release the handle that was obtained from NdisOpenConfigurationKeyByName. NdisCloseConfiguration also frees any temporary storage that NDIS allocated in the driver's calls to the NdisReadConfiguration, NdisReadNetworkAddress, or NdisWriteConfiguration functions with the SubKeyHandle that NdisOpenConfigurationKeyByName returned.

Requirements

Requirement Value
Minimum supported client Supported for NDIS 6.0 and NDIS 5.1 drivers (see NdisOpenConfigurationKeyByName (NDIS 5.1)) in Windows Vista. Supported for NDIS 5.1 drivers (see NdisOpenConfigurationKeyByName (NDIS 5.1)) in Windows XP.
Target Platform Universal
Header ndis.h (include Ndis.h)
Library Ndis.lib
IRQL < DISPATCH_LEVEL
DDI compliance rules Irql_Miscellaneous_Function(ndis)

See also

ANSI_STRING

MiniportInitializeEx

NdisCloseConfiguration

NdisOpenConfigurationEx

NdisOpenConfigurationKeyByIndex

NdisReadConfiguration

NdisWriteConfiguration

ProtocolBindAdapterEx

UNICODE_STRING