Share via


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 會傳回適當的錯誤碼。 下表顯示一些可能的傳回錯誤碼。

傳回碼 Description
STATUS_UNSUCCESSFUL
表示呼叫端正在 IRQL 上執行太高。
STATUS_INVALID_HANDLE
表示 句柄 參數值無效。
STATUS_INVALID_DEVICE_REQUEST
表示數據流未處於重設狀態,或目前未為 DMA 引擎配置任何緩衝區。

備註

FreeDmaBufferWithNotification 程會與 AllocateDmaBufferWithNotification 例程搭配使用。 這兩個例程僅適用於 HD 音訊 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