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 TestMinChannel() { int hr = 0; int minCh = 0; hr = analogTVTS.put_MinChannel(5); DsError.ThrowExceptionForHR(hr); hr = analogTVTS.get_MinChannel(out minCh); DsError.ThrowExceptionForHR(hr); Debug.Assert(minCh == 5, "IAnalogTVTuningSpace.get_MinChannel / put_MinChannel"); hr = analogTVTS.put_MinChannel(10); DsError.ThrowExceptionForHR(hr); hr = analogTVTS.get_MinChannel(out minCh); DsError.ThrowExceptionForHR(hr); Debug.Assert(minCh == 10, "IAnalogTVTuningSpace.get_MinChannel / put_MinChannel"); }