private void TestRange() { int hr = 0; int range; hr = freqFilter.put_Range(1234); //DsError.ThrowExceptionForHR(hr); hr = freqFilter.get_Range(out range); //DsError.ThrowExceptionForHR(hr); }
/// <summary> /// gets the diseqc reply /// </summary> /// <param name="pulRange">The DisEqCPort Port.</param> /// <returns>true if succeeded, otherwise false</returns> protected bool ReadDiSEqCCommand(out ulong pulRange) { // get ControlNode of tuner control node object ControlNode; int hr = _TunerDevice.GetControlNode(0, 1, 0, out ControlNode); if (hr == 0) // retrieve the BDA_DeviceControl interface { IBDA_DeviceControl DecviceControl = (IBDA_DeviceControl)_TunerDevice; if (DecviceControl != null) { if (ControlNode != null) { IBDA_FrequencyFilter FrequencyFilter = ControlNode as IBDA_FrequencyFilter; hr = DecviceControl.StartChanges(); if (hr == 0) { if (FrequencyFilter != null) { hr = FrequencyFilter.get_Range(out pulRange); Log.Log.Info(FormatMessage(" get_Range:{0} success:{1}"), pulRange, hr); if (hr == 0) { return(true); } Log.Log.Info(FormatMessage(" get_Range Failed!")); return(false); } } } } } Log.Log.Info(FormatMessage(" GetControlNode Failed!")); pulRange = 0; return(false); }