Previous Next

NdisOpenConfigurationKeyByName

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

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

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 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.
ConfigurationHandle
The handle to a registry key for which a subkey should be opened. Usually, ConfigurationHandle was returned by NdisOpenConfiguration or NdisOpenProtocolConfiguration.
SubKeyName
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 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.
SubKeyHandle
Pointer to a caller-supplied variable in which this function returns a handle to the opened subkey if this call is successful.

Headers

Declared in Ndis.h. Include Ndis.h.

Comments

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 NdisCloseConfiguration to release the handle obtained from NdisOpenConfigurationKeyByName. NdisCloseConfiguration also frees any temporary storage NDIS allocated in the driver's calls to NdisReadConfiguration, NdisReadNetworkAddress, and/or NdisWriteConfiguration with the SubKeyHandle returned by NdisOpenConfigurationKeyByName.

Callers of NdisOpenConfigurationKeyByName run at IRQL < DISPATCH_LEVEL.

See Also

ANSI_STRING, MiniportInitialize, NdisCloseConfiguration, NdisOpenConfiguration, NdisOpenConfigurationKeyByIndex, NdisOpenProtocolConfiguration, NdisReadConfiguration, NdisWriteConfiguration, ProtocolBindAdapter, UNICODE_STRING