The NdisWriteConfiguration function writes a caller-supplied value for a specified entry into the registry. This function must be invoked serially with respect to itself and the NdisReadConfiguration function.
VOID NdisWriteConfiguration( _Out_ PNDIS_STATUS Status, _In_ NDIS_HANDLE ConfigurationHandle, _In_ PNDIS_STRING Keyword, _In_ PNDIS_CONFIGURATION_PARAMETER ParameterValue );
- Status [out]
A pointer to a caller-supplied variable in which this function returns the status of the call as one of the following:
The supplied value at ParameterValue was written into the registry. If this is a new entry, the name at Keyword also was written into the registry.
The supplied ParameterType is invalid.
NDIS could not allocate resources, usually enough memory, to transfer the requested information to the registry.
The requested information could not be written.
- ConfigurationHandle [in]
- Keyword [in]
A pointer to an NDIS_STRING type describing a caller-supplied counted string, in the system-default character set, specifying the name of an entry for which to write the value. 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.
- ParameterValue [in]
Pointer to a caller-supplied NDIS_CONFIGURATION_PARAMETER structure.
If an entry of the same name as at Keyword already exists under the opened registry key, NdisWriteConfiguration replaces its current value with the caller-supplied value. Otherwise, NdisWriteConfiguration adds a new value entry with the given name and supplied value to the registry.
In the configuration registry of Windows 2000 and later versions, an NDIS Keyword is a synonym for a value entry name. Such a name is a counted sequence of Unicode characters, terminated with a NUL.
NdisWriteConfiguration buffers and copies the caller-supplied string at Keyword and the caller-supplied data specified at ParameterValue . This memory is freed when the driver releases the ConfigurationHandle with the NdisCloseConfiguration function. The caller of NdisWriteConfiguration is responsible for releasing the buffered string at Keyword and the memory allocated for the NDIS_CONFIGURATION_PARAMETER structure.
As an alternative to calling NdisWriteConfiguration, every NDIS driver can set up configuration information in the registry for itself using the AddReg directive in the driver's INF file.
For more information about setup and installation files for Windows 2000 and later versions, see Device Installation Overview.
|Supported for NDIS 6.0 and NDIS 5.1 drivers (see NdisWriteConfiguration (NDIS 5.1)) in Windows Vista. Supported for NDIS 5.1 drivers (see NdisWriteConfiguration (NDIS 5.1)) in Windows XP.|
DDI compliance rules