// strmini.h
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
);
View the official Windows Driver Kit DDI referenceNo description available.
The StreamClassGetPhysicalAddress routine translates a virtual memory address to a physical memory address and locks the corresponding physical memory for a DMA operation.
HwDeviceExtension [in]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.
HwSRB [in, optional]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.
VirtualAddress [in]Specifies the virtual address to be translated.
Type [in]Specifies the type of buffer pointed to by VirtualAddress. This value may be PerRequestExtension, DmaBuffer, or SRBDataBuffer.
Length [out]Specifies the length, in bytes, of the buffer.
StreamClassGetPhysicalAddress returns the translated virtual address as a physical memory address.
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. |