StreamClassGetPhysicalAddress function (strmini.h)

The StreamClassGetPhysicalAddress routine translates a virtual memory address to a physical memory address and locks the corresponding physical memory for a DMA operation.

Syntax

STREAM_PHYSICAL_ADDRESS STREAMAPI StreamClassGetPhysicalAddress(
  [in]           PVOID                    HwDeviceExtension,
  [in, optional] PHW_STREAM_REQUEST_BLOCK HwSRB,
  [in]           PVOID                    VirtualAddress,
  [in]           STREAM_BUFFER_TYPE       Type,
  [out]          ULONG                    *Length
);

Parameters

[in] HwDeviceExtension

Pointer to the minidriver's device extension. The minidriver specifies the size of this buffer in the HW_INITIALIZATION_DATA structure it passes when it registers itself via StreamClassRegisterMinidriver. The class driver then passes pointers to the buffer in the HwDeviceExtension member of the HW_STREAM_REQUEST_BLOCK, HW_STREAM_OBJECT, HW_TIME_CONTEXT, and PORT_CONFIGURATION_INFORMATION structures it passes to the minidriver.

[in, optional] HwSRB

Specifies a stream request block. This parameter is used only if the Type parameter has the value SRBDataBuffer, otherwise HwSRB should be NULL. This parameter is optional.

[in] VirtualAddress

Specifies the virtual address to be translated.

[in] Type

Specifies the type of buffer pointed to by VirtualAddress. This value may be PerRequestExtension, DmaBuffer, or SRBDataBuffer.

[out] Length

Specifies the length, in bytes, of the buffer.

Return value

StreamClassGetPhysicalAddress returns the translated virtual address as a physical memory address.

Remarks

The type of buffer to be used is specified in the Type parameter. The meanings of these values are shown in the following table.

Buffer Type Description
PerRequestExtension Indicates the physical address of the SRB extension.
DmaBuffer Indicates the physical address of the DMA buffer.
SRBDataBuffer Indicates the physical address of the data buffer.

Requirements

Requirement Value
Target Platform Desktop
Header strmini.h (include Strmini.h)
Library Stream.lib