NetDeviceOpenConfiguration function


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 NetDeviceOpenConfiguration method opens a net device's configuration database.


NTSTATUS NetDeviceOpenConfiguration(
  WDFDEVICE             Device,
  WDF_OBJECT_ATTRIBUTES *ConfigurationAttributes,
  NETCONFIGURATION      *Configuration



The WDFDEVICE object the client driver previously created with a call to WdfDeviceCreate.


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


A pointer to the location that receives the new NETCONFIGURATION object.

Return Value

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


Typically, the client calls this method from its EVT_WDF_DRIVER_DEVICE_ADD callback function.

If the client provides a WDF_OBJECT_ATTRIBUTES, it specifies NULL for ParentObject. The device configuration object is automatically parented to the device object.

As a result, WDF automatically deletes the configuration object when the device is deleted. However, the client can manually delete a configuration object by calling WdfObjectDelete, typically from its EVT_WDF_OBJECT_CONTEXT_CLEANUP callback function.


Target Platform Universal
Minimum KMDF version 1.27
Header netdevice.h (include netadaptercxstub.lib)
Library netadaptercxstub.lib

See Also

Accessing configuration information