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 Audio 总线驱动程序维护每个 DMA 引擎的已注册通知事件列表,并在引擎每次收到 IOC 中断时发出信号。 使用 UnregisterNotificationEvent 取消注册事件。

要求

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

另请参阅

AllocateCaptureDmaEngine

AllocateDmaBufferWithNotification

AllocateRenderDmaEngine

HDAUDIO_BUS_INTERFACE_V2

UnregisterNotificationEvent