Esempio n. 1
0
 private void GetAudioVolumeLevel()
 {
     _Part.Activate(CLSCTX.ALL, ref IIDs.IID_IAudioVolumeLevel, out object result);
     if (result != null)
     {
         _AudioVolumeLevel = new AudioVolumeLevel(result as IAudioVolumeLevel);
         _AudioVolumeLevelChangeNotification = new ControlChangeNotify(this);
         Marshal.ThrowExceptionForHR(_Part.RegisterControlChangeCallback(ref IIDs.IID_IAudioVolumeLevel, _AudioVolumeLevelChangeNotification));
     }
 }
Esempio n. 2
0
 private void GetAudioVolumeLevel()
 {
     object result = null;
     _Part.Activate(CLSCTX.ALL, ref IIDs.IID_IAudioVolumeLevel, out result);
     if (result != null)
     {
         _AudioVolumeLevel = new AudioVolumeLevel(result as IAudioVolumeLevel);
         _AudioVolumeLevelChangeNotification = new ControlChangeNotify(this);
         Marshal.ThrowExceptionForHR(_Part.RegisterControlChangeCallback(ref IIDs.IID_IAudioVolumeLevel, _AudioVolumeLevelChangeNotification));
     }
 }