NdisOpenConfigurationKeyByIndex opens a subkey of a given open registry key designated by a caller-supplied handle.
VOID
NdisOpenConfigurationKeyByIndex(
OUT PNDIS_STATUS Status,
IN NDIS_HANDLE ConfigurationHandle,
IN ULONG Index,
OUT PNDIS_STRING KeyName,
OUT PNDIS_HANDLE KeyHandle
);
Declared in Ndis.h. Include Ndis.h.
NdisOpenConfigurationKeyByIndex allows a driver to access configuration information that its installation script stored in a registry subkey.
Note that the ConfigurationHandle passed in to NdisOpenConfigurationKeyByIndex can be any valid handle to a registry key already opened by the caller. NdisOpenConfigurationKeyByIndex returns configuration information for subkeys relative to any valid ConfigurationHandle.
Since NdisOpenConfigurationKeyByIndex references a subkey through an index, the driver does not have to specify subkey names. A driver can sequence through a set of registry subkeys by repeatedly calling NdisOpenConfigurationKeyIndex after incrementing the index until the function returns NDIS_STATUS_FAILURE, thereby indicating that there are no more subkeys to open.
After a driver has consumed and, possibly, modified the configuration information stored in the registry, it must call NdisCloseConfiguration to release the handle obtained from NdisOpenConfigurationKeyByIndex. NdisCloseConfiguration also frees any temporary storage NDIS allocated for the driver's calls to NdisReadConfiguration, NdisReadNetworkAddress, and/or NdisWriteConfiguration with the SubKeyHandle returned by NdisOpenConfigurationKeyByIndex.
Callers of NdisOpenConfigurationKeyByIndex run at IRQL < DISPATCH_LEVEL.
ANSI_STRING, MiniportInitialize, NdisCloseConfiguration, NdisOpenConfiguration, NdisOpenConfigurationKeyByName, NdisOpenProtocolConfiguration, NdisReadConfiguration, NdisWriteConfiguration, ProtocolBindAdapter, UNICODE_STRING