NetDeviceOpenConfiguration - NtDoc

Native API online documentation, based on the System Informer (formerly Process Hacker) phnt headers
// netdevice.h

NTSTATUS NetDeviceOpenConfiguration(
  [_In_]     WDFDEVICE             Device,
  [_In_opt_] WDF_OBJECT_ATTRIBUTES *ConfigurationAttributes,
  [_Out_]    NETCONFIGURATION      *Configuration
);
View the official Windows Driver Kit DDI reference

NtDoc

No description available.

Windows Driver Kit DDI reference (nf-netdevice-netdeviceopenconfiguration)

NetDeviceOpenConfiguration function

Description

The NetDeviceOpenConfiguration function opens a net device's configuration database.

Parameters

Device [_In_]

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

ConfigurationAttributes [_In_opt_]

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.

Configuration [_Out_]

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

Return value

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

Remarks

Typically, the client calls this function 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.

See also

Accessing configuration information