NetConfigurationAssignUnicodeString function (netconfiguration.h)

The NetConfigurationAssignUnicodeString function assigns a specified Unicode string to a specified value name in the registry.

Syntax

NTSTATUS NetConfigurationAssignUnicodeString(
  [_In_] NETCONFIGURATION Configuration,
  [_In_] PCUNICODE_STRING ValueName,
  [_In_] PCUNICODE_STRING Value
);

Parameters

[_In_] Configuration

A handle to a NETCONFIGURATION object that represents an opened registry key.

[_In_] ValueName

A pointer to a UNICODE_STRING structure that contains a value name.

[_In_] Value

A pointer to a UNICODE_STRING structure that contains the string to be assigned to the value name that ValueName specifies.

Return value

This function returns STATUS_SUCCESS if the operation succeeds. Otherwise, this function may return an appropriate NTSTATUS error code.

Remarks

The client driver obtains a handle to a NETCONFIGURATION object by calling NetAdapterOpenConfiguration or NetConfigurationOpenSubConfiguration.

If an entry of the same name as ValueName already exists under the opened registry key, NetConfigurationAssignUnicodeString replaces its current value with the caller-supplied value. Otherwise, NetConfigurationAssignUnicodeString adds a new value entry with the given name and supplied value to the registry.

Requirements

Requirement Value
Target Platform Universal
Minimum KMDF version 1.21
Minimum UMDF version 2.33
Header netconfiguration.h (include netadaptercx.h)
IRQL PASSIVE_LEVEL