NetConfigurationQueryString function (netconfiguration.h)

Retrieves the specified string value from the adapter configuration object and assigns the string to a specified framework string object.

Syntax

NTSTATUS NetConfigurationQueryString(
  [_In_]     NETCONFIGURATION      Configuration,
  [_In_]     PCUNICODE_STRING      ValueName,
  [_In_opt_] WDF_OBJECT_ATTRIBUTES *StringAttributes,
  [_Out_]    WDFSTRING             *WdfString
);

Parameters

[_In_] Configuration

Handle to a NETCONFIGURATION object that represents an opened registry key.

[_In_] ValueName

A pointer to a UNICODE_STRING structure that contains a name for string value.

[_In_opt_] StringAttributes

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

[_Out_] WdfString

A handle to a framework string object. NetAdapterCx will assign the registry value's string data to this object.

Return value

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

Remarks

The client driver obtains a handle to a NETCONFIGURATION object by calling NetAdapterOpenConfiguration or NetConfigurationOpenSubConfiguration.

By default, the framework string object is parented to the collection object. The client driver can change this by setting the ParentObject member of the WDF_OBJECT_ATTRIBUTES structure.

Requirements

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