NetConfigurationQueryBinary 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.

Retrieves the data that is currently assigned to a specified registry value, stores the data in a framework-allocated buffer, and creates a framework memory object to represent the buffer.

Syntax

NTSTATUS NetConfigurationQueryBinary(
  NETCONFIGURATION      Configuration,
  PCUNICODE_STRING      ValueName,
  POOL_TYPE             PoolType,
  WDF_OBJECT_ATTRIBUTES *MemoryAttributes,
  WDFMEMORY             *Memory
);

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.

PoolType

A POOL_TYPE-typed value that specifies the type of memory to be allocated for the data buffer.

MemoryAttributes

A pointer to a WDF_OBJECT_ATTRIBUTES structure that contains object attributes for the new memory object. This parameter is optional and can be WDF_NO_OBJECT_ATTRIBUTES.

Memory

A pointer to a location that receives a handle to the new memory object. The framework allocates this memory buffer and automatically frees it when the NETCONFIGURATION object is closed.

Return Value

The 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.

The memory allocated by this method is automatically freed by the framework when the NETCONFIGURATION object is closed.

Requirements

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