NetConfigurationAssignBinary function

Warning

Some information in this topic relates to prereleased product, which may be substantially modified before it's commercially released. Microsoft makes no warranties, express or implied, with respect to the information provided here.

NetAdapterCx is preview only in Windows 10, version 1903.

The NetConfigurationAssignBinary method writes caller-supplied binary data to a specified value name in the registry.

Syntax

NTSTATUS NetConfigurationAssignBinary(
  NETCONFIGURATION Configuration,
  PCUNICODE_STRING ValueName,
  void             *Buffer,
  ULONG            BufferLength
);

Parameters

Configuration

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

ValueName

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

Buffer

A pointer to a buffer that contains driver-supplied data.

BufferLength

The length, in bytes, of the buffer to which Buffer points.

Return Value

This method returns STATUS_SUCCESS if the operation succeeds. Otherwise, this method 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, NetConfigurationAssignBinary replaces its current value with the caller-supplied value. Otherwise, NetConfigurationAssignBinary adds a new value entry with the given name and supplied value to the registry.

Requirements

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