让指定进程静音支持页游

易语言 2020-07-09 09:34:01 217 1

让指定进程静音支持页游

.变量循环首 (0, count - 1, 1, i)
Success = IID_IAudioSessionEnumerator.GetSession (i, session)
session_ctrl.初始化COM接口 (session)
IAudioSessionControl2 = 取空白字节集 (16)
API_CLSIDFromString (A2W (“{bfb7ff88-7239-4fc9-8fa2-07c950be9c6d}”), IAudioSessionControl2)
session_ctrl.QueryInterface (_getAddress (IAudioSessionControl2), session2)
session_ctrl2.初始化COM接口 (session2)
Success = session_ctrl2.GetProcessId (pid)
.如果真 (target_pid = pid)
ISimpleAudioVolume = 取空白字节集 (16)
API_CLSIDFromString (A2W (“{87CE5498-68D6-44E5-9215-6DA47EF883D8}”), ISimpleAudioVolume)
session_ctrl2.QueryInterface (_getAddress (ISimpleAudioVolume), simple)
simple_vol.初始化COM接口 (simple)
Success = simple_vol.SetMute (Mute, 0)
.如果真结束
处理事件 ()
.变量循环尾 ()