Bewerken

Delen via


IPortClsStreamResourceManager2::AddStreamResource2 method (portcls.h)

AddStreamResource2 adds a stream resource. Two type of stream resources are supported: interrupts and driver-owned threads. The AddStreamResource2 method can only be used by audio waveRT miniport drivers.

Syntax

NTSTATUS AddStreamResource2(
  [in]  PDEVICE_OBJECT               PhysicalDeviceObject,
  [in]  PVOID                        ResourceSet,
  [in]  PPCSTREAMRESOURCE_DESCRIPTOR ResourceDescriptor,
  [out] PCSTREAMRESOURCE             *ResourceHandle
);

Parameters

[in] PhysicalDeviceObject

Pointer to the device object. The device object is a system structure of type DEVICE_OBJECT.

[in] ResourceSet

PVOID - Reserved for future use, set to NULL. Only device-scoped resources are supported at this time.

[in] ResourceDescriptor

PPCSTREAMRESOURCE_DESCRIPTOR - The resource to add. For more information see, PCSTREAMRESOURCE_DESCRIPTOR.

[out] ResourceHandle

PCSTREAMRESOURCE* - The location that will hold the resource handle. For more information, see RemoveStreamResource.

Return value

STATUS_SUCCESS – The driver was able to register the resource of the specified PDO.

STATUS_INVALID_PARAMETER – The driver returns this error if it finds any other parameter invalid, aside from the specific cases for other error status instances.

Additional standard status codes may be returned.

Requirements

Requirement Value
Minimum supported client Available in Windows 10, version 1511 and later versions of Windows.
Target Platform Universal
Header portcls.h (include Portcls.h)
Library Portcls.lib
IRQL PASSIVE_LEVEL

See also

IPortClsStreamResourceManager

IPortClsStreamResourceManager2

PCSTREAMRESOURCE_DESCRIPTOR

RemoveStreamResource