Пример #1
0
 public void Dispose()
 {
     if (_CallBack != null)
     {
         Marshal.ThrowExceptionForHR(_AudioEndPointVolume.UnregisterControlChangeNotify(_CallBack));
         _CallBack = null;
     }
 }
 internal AudioEndpointVolume(IAudioEndpointVolume realEndpointVolume)
 {
     _AudioEndPointVolume = realEndpointVolume;
     _CallBack            = new AudioEndpointVolumeCallback(this);
     Marshal.ThrowExceptionForHR(_AudioEndPointVolume.RegisterControlChangeNotify(_CallBack));
 }
Пример #3
0
 internal AudioEndpointVolume(IAudioEndpointVolume realEndpointVolume)
 {
     _AudioEndPointVolume = realEndpointVolume;
     _CallBack = new AudioEndpointVolumeCallback(this);
     Marshal.ThrowExceptionForHR(_AudioEndPointVolume.RegisterControlChangeNotify( _CallBack));
 }