NdisOpenConfiguration (Compact 2013)
3/26/2014
This function returns a handle for an NDIS NIC driver's \DriverName\Parms registry key.
Syntax
VOID NdisOpenConfiguration(
PNDIS_STATUS Status,
PNDIS_HANDLE ConfigurationHandle,
NDIS_HANDLE WrapperConfigurationContext
);
Parameters
- Status
[out] Pointer to a caller-supplied variable in which this function returns the status of its attempt to open the registry key
- ConfigurationHandle
[out] Pointer to a caller-supplied variable in which this function returns a handle to the registry HKEY_LOCAL_MACHINE\Comm\DriverName\Parms key. Value entries under this key are provided by the driver's installation script.
- WrapperConfigurationContext
[in] Handle input to the MiniportInitialize function.
Return Value
The following table shows the possible return values.
Value |
Description |
---|---|
NDIS_STATUS_SUCCESS |
The value at ConfigurationHandle is valid. |
NDIS_STATUS_FAILURE |
The key could not be opened. |
Handle |
Specifies a handle to the registry HKEY_LOCAL_MACHINE\Comm\DriverName\Parms key. |
Remarks
With the handle returned by this function, an NDIS miniport can call the NdisReadConfiguration function one or more times to extract configuration information about its NIC from the registry. A miniport can also call NdisReadNetworkAddress with this handle to retrieve software-configurable network address information that was stored in the registry when its NIC was installed in the current computer.
A miniport's installation script must store at least the following configuration information in the registry:
- The NIC's I/O bus interface type.
- If it is not on an ISA bus, the bus number.
- The NIC's adapter identifier value, which, depending on the I/O bus interface type, is equivalent to the following bus-type-specific configuration data value:
If the NIC is on a PCI bus, the value of the PCI DeviceId
Drivers of NICs on ISA buses usually get bus-relative configuration parameters for an NIC from the registry with the NdisReadConfiguration function. Drivers of NICs on other types of I/O buses can also call NdisXXX bus-type-specific configuration functions to get bus-relative NIC-specific configuration parameters suitable for calling functions, such as NdisMRegisterInterrupt, NdisMMapIoSpace, and/or NdisMRegisterIoPortRange.
An NIC driver calls the NdisMSetAttributes or the NdisMSetAttributesEx function to identify the type of I/O bus on which its NIC is likely to be found before that driver calls any of the bus-type-specific configuration functions.
After a driver has consumed and, possibly, modified the registry configuration information, the driver must call the NdisCloseConfiguration function to release the handle obtained from this function and to free any temporary storage that NDIS allocated in the driver's calls to NdisReadConfiguration, NdisReadNetworkAddress, and/or NdisWriteConfiguration.
Requirements
Header |
ndis.h |
See Also
Reference
NDIS 5.x Legacy Functions
MiniportInitialize
NdisCloseConfiguration
NdisMMapIoSpace
NdisMRegisterInterrupt
NdisMRegisterIoPortRange
NdisMRegisterMiniport
NdisMSetAttributes
NdisMSetAttributesEx
NdisOpenProtocolConfiguration
NdisReadConfiguration
NdisReadNetworkAddress
NdisReadPciSlotInformation
NdisRegisterProtocol
NdisWriteConfiguration