NdisWriteConfiguration (Windows CE 5.0)

Send Feedback

This function writes a caller-supplied value for a specified entry into the registry.

VOID NdisWriteConfiguration(PNDIS_STATUS Status,NDIS_HANDLE ConfigurationHandle,PNDIS_STRING Keyword,PNDIS_CONFIGURATION_PARAMETER ParameterValue);

Parameters

  • Status
    [out] Pointer to a caller-supplied variable that indicates the status of the call.
  • ConfigurationHandle
    [in] Specifies the handle returned by the NdisOpenConfiguration or the NdisOpenProtocolConfiguration function.
  • Keyword
    [in] Pointer to a caller-supplied counted string, in the system-default character set, specifying the name of an entry for which to write the value.
  • ParameterValue
    [in] Points to a caller-supplied variable set to the address of a filled-in NDIS_CONFIGURATION_PARAMETER structure.

Return Values

The following table shows the return values for this function.

Value Description
NDIS_STATUS_SUCCESS The supplied value at ParameterValue was written into the registry. If this is a new entry, the name at Keyword was also written into the registry.
NDIS_STATUS_NOT_SUPPORTED The supplied ParameterType is invalid.
NDIS_STATUS_RESOURCES NDIS could not allocate resources, usually enough memory, to transfer the requested information to the registry.
NDIS_STATUS_FAILURE The requested information could not be written.

Remarks

If an entry of the same name as at Keyword already exists under the opened registry key, this function replaces its current value with the caller-supplied value. Otherwise, this function adds a new value entry with the specified name and supplied value to the registry.

This function 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 this function is responsible for releasing the buffered string at Keyword and the memory allocated for the NDIS_CONFIGURATION_PARAMETER structure.

As an alternative to calling this function, every NDIS driver can set up configuration information in the registry for itself under the driver's Parameters key, using an installation script.

Requirements

OS Versions: Windows CE .NET 4.0 and later.
Header: Ndis.h.

See Also

NdisAnsiStringToUnicodeString | NdisCloseConfiguration | NdisFreeMemory | NdisFreeString | NdisInitAnsiString | NdisInitializeString | NdisInitUnicodeString | NdisOpenConfiguration | NdisOpenProtocolConfiguration | NdisReadConfiguration | NdisUnicodeStringToAnsiString

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.