Bewerken

Delen via


UrsIoResourceListAppendDescriptor function (ursdevice.h)

Appends the specified resource descriptor to the specified I/O resource list object that maintains resource descriptors for the host or function role.

Syntax

NTSTATUS UrsIoResourceListAppendDescriptor(
  [in] URSIORESLIST            IoResourceList,
  [in] PIO_RESOURCE_DESCRIPTOR Descriptor
);

Parameters

[in] IoResourceList

A role's I/O resource list object to which the resource descriptor is appended. This object is allocated by the framework and passed to the client driver when the framework invokes the driver's EVT_URS_DEVICE_FILTER_RESOURCE_REQUIREMENTS implementation.

[in] Descriptor

A pointer to IO_RESOURCE_DESCRIPTOR that contains the resource descriptor for the role.

Return value

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

Remarks

After the client driver calls UrsDeviceInitialize, the framework allocates memory for the resource requirements list. When the USB dual-role class extension invokes the client driver's implementation of EVT_URS_DEVICE_FILTER_RESOURCE_REQUIREMENTS, it passes a WDFIORESREQLIST handle to that requirements list along with URSIORESLIST handles for host and function role resource lists. In the implementation, the client driver is expected to enumerate through the requirements list and add the resource descriptor (if it wants to use that resource) to the resource list for each role.

To add a resource descriptors for a role, the driver calls UrsIoResourceListAppendDescriptor and specifies the descriptor and the resource list to which the resource must be added.

For a code example, see EVT_URS_DEVICE_FILTER_RESOURCE_REQUIREMENTS.

For more information about resource requirements lists, see Handling Hardware Resources.

Requirements

Requirement Value
Minimum supported client Windows 10
Minimum supported server Windows Server 2016
Target Platform Windows
Minimum KMDF version 1.15
Header ursdevice.h (include Urscx.h)
Library Urscxstub.lib
IRQL PASSIVE_LEVEL

See also

EVT_URS_DEVICE_FILTER_RESOURCE_REQUIREMENTS

UrsDeviceInitialize