IMMNotificationClient interface(MSDN理解)
2016-03-17 21:53
393 查看
1. 名称:多媒体客户端产生通知的接口
2. 作用:
1)MSDN:
The IMMNotificationClient interface provides notifications when an
audio endpoint device is added or removed, when the state or properties of an endpoint device change, or when there is a change in the default role assigned to an endpoint device.
2)中文:IMMNotificationClient 接口会提供发送通知的功能,当多媒体终端驱动被添加进来,或者移除了,它们的驱动变更了,又或者他们的默认参数发生了改动,等等情况下,
IMMNotificationClient就能产生通知。
3. 用法:
1)MSDN:To receive notifications, the client passes a pointer to its IMMNotificationClient interface instance as a parameter to the
IMMDeviceEnumerator::RegisterEndpointNotificationCallback method.
2)中文:要想接受到通知,客户端程序必须传递一个指向IMMNotificationClient interface instance的指针作为IMMDeviceEnumerator::RegisterEndpointNotificationCallback
函数的参数值,这只是个注册函数。。。
3)接着,我们得调用IMMNotificationClient interface的方法获得你想要了解的驱动ID
A client can use the endpoint ID string that it receives as an input parameter in a call to an
IMMNotificationClient method in two ways:
The client can create an instance of the device that the endpoint ID string identifies. The client does this by calling the
IMMDeviceEnumerator::GetDevice method and supplying the endpoint ID string as an input parameter.
The client can compare the endpoint ID string with the endpoint ID string of an existing device instance. To obtain the second endpoint ID string, the client calls the
IMMDevice::GetId method of the device instance. If the two strings match, they identify the same device.
2. 作用:
1)MSDN:
The IMMNotificationClient interface provides notifications when an
audio endpoint device is added or removed, when the state or properties of an endpoint device change, or when there is a change in the default role assigned to an endpoint device.
2)中文:IMMNotificationClient 接口会提供发送通知的功能,当多媒体终端驱动被添加进来,或者移除了,它们的驱动变更了,又或者他们的默认参数发生了改动,等等情况下,
IMMNotificationClient就能产生通知。
3. 用法:
1)MSDN:To receive notifications, the client passes a pointer to its IMMNotificationClient interface instance as a parameter to the
IMMDeviceEnumerator::RegisterEndpointNotificationCallback method.
2)中文:要想接受到通知,客户端程序必须传递一个指向IMMNotificationClient interface instance的指针作为IMMDeviceEnumerator::RegisterEndpointNotificationCallback
函数的参数值,这只是个注册函数。。。
3)接着,我们得调用IMMNotificationClient interface的方法获得你想要了解的驱动ID
A client can use the endpoint ID string that it receives as an input parameter in a call to an
IMMNotificationClient method in two ways:
The client can create an instance of the device that the endpoint ID string identifies. The client does this by calling the
IMMDeviceEnumerator::GetDevice method and supplying the endpoint ID string as an input parameter.
The client can compare the endpoint ID string with the endpoint ID string of an existing device instance. To obtain the second endpoint ID string, the client calls the
IMMDevice::GetId method of the device instance. If the two strings match, they identify the same device.
Method | Description |
---|---|
OnDefaultDeviceChanged | Notifies the client that the default audio endpoint device for a particular role has changed. |
OnDeviceAdded | Indicates that a new audio endpoint device has been added. |
OnDeviceRemoved | Indicates that an audio endpoint device has been removed. |
OnDeviceStateChanged | Indicates that the state of an audio endpoint device has changed. |
OnPropertyValueChanged | Indicates that the value of a property belonging to an audio endpoint device has changed. |
相关文章推荐
- 20.ELK实时日志分析平台之Elasticsearch 查询简介
- OC中的字典NSDictionary
- 练习脚本二:批量添加用户
- 任务三:三栏式布局
- Python:OS 模块 -- 进程管理
- win10下apache不能正常启动的解决方案之一
- VPCS不能通过dhcp协议在win server下获取ip地址的验证性试验
- iOS 开发基础UIControl事件
- onDraw绘画
- 总结
- 复利计算
- 网站根目录的问题
- Python修复图像文件后缀名
- 使用dom4j读写xml实例
- MySQL 5.6 for Windows 解压缩版配置安装
- Qt输出日志文件
- iOS的单例模式
- kd树简介 在matlab下VLFeat中的kd-tree使用
- C++实验报告3
- MES案例研究3 – 质量门检查