Bewerken

Delen via


NetConfigurationOpenSubConfiguration function (netconfiguration.h)

Opens a sub configuration of a specified adapter configuration object.

Syntax

NTSTATUS NetConfigurationOpenSubConfiguration(
  [_In_]     NETCONFIGURATION      Configuration,
  [_In_]     PCUNICODE_STRING      SubConfigurationName,
  [_In_opt_] WDF_OBJECT_ATTRIBUTES *SubConfigurationAttributes,
  [_Out_]    NETCONFIGURATION      *SubConfiguration
);

Parameters

[_In_] Configuration

A handle to an adapter configuration object opened in a prior call to NetAdapterOpenConfiguration or NetConfigurationOpenSubConfiguration.

[_In_] SubConfigurationName

A pointer to a string specifying the name of the sub configuration to open.

[_In_opt_] SubConfigurationAttributes

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.

[_Out_] SubConfiguration

A pointer to a location that receives a handle to the new sub configuration object.

Return value

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

Remarks

If the client provides a WDF_OBJECT_ATTRIBUTES, it specifies NULL for ParentObject. By default, the sub configuration is parented to the existing adapter configuration object.

The client driver closes the sub configuration by calling NetConfigurationClose with either the sub configuration object or the parent adapter configuration object.

Requirements

Requirement Value
Target Platform Universal
Minimum KMDF version 1.21
Minimum UMDF version 2.33
Header netconfiguration.h (include netadaptercx.h)
Library NetAdapterCxStub.lib
IRQL PASSIVE_LEVEL

See also

NetAdapterOpenConfiguration

NetConfigurationOpenSubConfiguration