// netconfiguration.h
NTSTATUS NetConfigurationAssignBinary(
[_In_] NETCONFIGURATION Configuration,
[_In_] PCUNICODE_STRING ValueName,
[__In_reads_bytes_(BufferLength)_] void *Buffer,
[_In_] ULONG BufferLength
);
View the official Windows Driver Kit DDI referenceNo description available.
The NetConfigurationAssignBinary function writes caller-supplied binary data to a specified value name in the registry.
Configuration [_In_]A handle to a NETCONFIGURATION object that represents an opened registry key.
ValueName [_In_]A pointer to a UNICODE_STRING structure that contains a value name.
Buffer [__In_reads_bytes_(BufferLength)_]A pointer to a buffer that contains driver-supplied data.
BufferLength [_In_]The length, in bytes, of the buffer to which Buffer points.
This function returns STATUS_SUCCESS if the operation succeeds. Otherwise, this function may return an appropriate NTSTATUS error code.
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.