Freigeben über


NdisOpenConfigurationKeyByName (Compact 2013)

3/26/2014

This function opens a named subkey of a given open registry key designated by a caller-supplied handle.

Syntax

VOID NdisOpenConfigurationKeyByName(
  PNDIS_STATUS Status,
  NDIS_HANDLE ConfigurationHandle,
  PNDIS_STRING SubKeyName,
  PNDIS_HANDLE SubKeyHandle
);

Parameters

  • Status
    [out] Points to a caller-supplied variable in which this function returns the status of its attempt to open the registry key.
  • ConfigurationHandle
    [in] The handle to a registry key for which a subkey should be opened. Typically, ConfigurationHandle is returned by the NdisOpenConfigurationEx function.
  • SubKeyName
    [in] Points to a caller-supplied, counted string in the system-default character set that specifies the name of the registry sub key to open.
  • SubKeyHandle
    [out] Points to a caller-supplied variable in which this function returns a handle to the opened sub key if this call is successful.

Return Value

The following table shows return values for this function.

Value

Description

NDIS_STATUS_SUCCESS

NDIS has initialized accessed to the sub key that is specified by KeyName and Index.

NDIS_STATUS_FAILURE

The key could not be opened.

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 in relation 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 by using the SubKeyHandle that NdisOpenConfigurationKeyByName returned.

Requirements

Header

ndis.h

See Also

Reference

NDIS Configuration Interface
MiniportInitializeEx
NdisCloseConfiguration
NdisOpenConfigurationEx
NdisOpenProtocolConfiguration
NdisReadConfiguration
NdisReadNetworkAddress
NdisWriteConfiguration
NdisOpenConfigurationKeyByIndex
ProtocolBindAdapterEx