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)); } }
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)); } }