private void Config() { int hr = 0; IAnalogTVTuningSpace ts = (IAnalogTVTuningSpace) new AnalogTVTuningSpace(); ITuneRequest tr = null; hr = ts.put_CountryCode(33); DsError.ThrowExceptionForHR(hr); hr = ts.put_InputType(TunerInputType.Cable); DsError.ThrowExceptionForHR(hr); hr = ts.put_MaxChannel(50); DsError.ThrowExceptionForHR(hr); hr = ts.put_MinChannel(5); DsError.ThrowExceptionForHR(hr); hr = ts.CreateTuneRequest(out tr); DsError.ThrowExceptionForHR(hr); channelTR = (IChannelTuneRequest)tr; Marshal.ReleaseComObject(ts); }
private void TestInputType() { int hr = 0; TunerInputType inputType; hr = analogTVTS.put_InputType(TunerInputType.Antenna); DsError.ThrowExceptionForHR(hr); hr = analogTVTS.get_InputType(out inputType); DsError.ThrowExceptionForHR(hr); Debug.Assert(inputType == TunerInputType.Antenna, "IAnalogTVTuningSpace.get_InputType / put_InputType"); hr = analogTVTS.put_InputType(TunerInputType.Cable); DsError.ThrowExceptionForHR(hr); hr = analogTVTS.get_InputType(out inputType); DsError.ThrowExceptionForHR(hr); Debug.Assert(inputType == TunerInputType.Cable, "IAnalogTVTuningSpace.get_InputType / put_InputType"); }