PFREE_DMA_BUFFER_WITH_NOTIFICATION回调函数 (hdaudio.h)

FreeDmaBufferWithNotification 程释放先前通过调用 AllocateDmaBufferWithNotification 分配的 DMA 缓冲区。

FreeDmaBufferWithNotification 例程的函数指针类型定义如下。

语法

PFREE_DMA_BUFFER_WITH_NOTIFICATION PfreeDmaBufferWithNotification;

NTSTATUS PfreeDmaBufferWithNotification(
  [in] PVOID _context,
  [in] HANDLE Handle,
  [in] PMDL BufferMdl,
  [in] SIZE_T BufferSize
)
{...}

参数

[in] _context

指定 HDAUDIO_BUS_INTERFACE_V2 结构的 Context 成员中的上下文值。

[in] Handle

标识 DMA 引擎的句柄。 此句柄值是从以前调用 AllocateCaptureDmaEngineAllocateRenderDmaEngine 获取的

[in] BufferMdl

指向缓冲区 MDL 的指针。 此值是从上一次调用 AllocateDmaBufferWithNotification 获取的。

[in] BufferSize

要释放的缓冲区的大小。 此值是从上一次调用 AllocateDmaBufferWithNotification 获取的。

返回值

FreeDmaBufferWithNotification 如果调用成功,则返回STATUS_SUCCESS。 否则, FreeDmaBufferWithNotification 将返回相应的错误代码。 下表显示了一些可能的返回错误代码。

返回代码 说明
STATUS_UNSUCCESSFUL
指示调用方在太高的 IRQL 上运行。
STATUS_INVALID_HANDLE
指示 句柄 参数值无效。
STATUS_INVALID_DEVICE_REQUEST
指示流未处于重置状态,或者当前未为 DMA 引擎分配任何缓冲区。

注解

FreeDmaBufferWithNotification 例程与 AllocateDmaBufferWithNotification 例程一起使用。 这两个例程仅在 hd Audio DDI 的 HDAUDIO_BUS_INTERFACE_V2 版本中可用。

FreeDmaBufferWithNotification 的调用方必须在 IRQL PASSIVE_LEVEL运行。

要求

要求
最低受支持的客户端 在 Windows Vista 和更高版本的 Windows 中可用。
目标平台 桌面
标头 hdaudio.h (包括 Hdaudio.h)
IRQL PASSIVE_LEVEL

另请参阅

AllocateCaptureDmaEngine

AllocateDmaBufferWithNotification

AllocateRenderDmaEngine

HDAUDIO_BUS_INTERFACE_V2