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); }
public void DoTests() { analogTVTS = (IAnalogTVTuningSpace) new AnalogTVTuningSpace(); try { TestCountryCode(); TestInputType(); TestMaxChannel(); TestMinChannel(); } finally { Marshal.ReleaseComObject(analogTVTS); } }