Share via


PREGISTER_NOTIFICATION_EVENT回呼函式 (hdaudio.h)

RegisterNotificationEvent 例程會註冊核心事件,以便接收 DMA 進度通知。

RegisterNotificationEvent 例程的函式指標類型定義如下。

語法

PREGISTER_NOTIFICATION_EVENT PregisterNotificationEvent;

NTSTATUS PregisterNotificationEvent(
  [in] PVOID _context,
  [in] HANDLE Handle,
  [in] PKEVENT NotificationEvent
)
{...}

參數

[in] _context

指定 HDAUDIO_BUS_INTERFACE_V2 結構之 Context 成員的內容值。

[in] Handle

識別 DMA 引擎的句柄。 這個句柄值是從先前呼叫 AllocateCaptureDmaEngineAllocateRenderDmaEngine 取得。

[in] NotificationEvent

核心事件的指標,必須在 DMA 進行時收到通知。 根據 與 AllocateDmaBufferWithNotification 搭配使用的通知計數參數而定,每次 DMA 通過音頻緩衝區時,已註冊的事件都會發出一或兩次的訊號。

傳回值

如果呼叫成功註冊事件,RegisterNotificationEvent 會傳回STATUS_SUCCESS。 否則,例程會傳回STATUS_INSUFFICIENT_RESOURCES,表示沒有足夠的資源可用來完成作業。

備註

RegisterNotificationEvent 向 HD 音訊總線驅動程式註冊核心事件。 HD 音訊總線驅動程式會針對每個 DMA 引擎維護已註冊的通知事件清單,並在每次引擎收到 IOC 中斷時發出訊號。 事件會使用 UnregisterNotificationEvent 取消註冊。

規格需求

需求
最低支援的用戶端 可在 Windows Vista 和更新版本的 Windows 中使用。
目標平台 桌面
標頭 hdaudio.h (包含 Hdaudio.h)
IRQL PASSIVE_LEVEL

另請參閱

AllocateCaptureDmaEngine

AllocateDmaBufferWithNotification

AllocateRenderDmaEngine

HDAUDIO_BUS_INTERFACE_V2

UnregisterNotificationEvent