private void TestFindID() { int hr = 0; int id; ITuningSpace ts; hr = tsContainer.get_Item(3, out ts); DsError.ThrowExceptionForHR(hr); hr = tsContainer.FindID(ts, out id); DsError.ThrowExceptionForHR(hr); Debug.Assert(id == 3, "ITuningSpaceContainer.FindID"); }
private void Config() { int hr = 0; ITuningSpaceContainer tsContainer = (ITuningSpaceContainer) new SystemTuningSpaces(); hr = tsContainer.get_Item(3, out tuningSpace); DsError.ThrowExceptionForHR(hr); Marshal.ReleaseComObject(tsContainer); }
private void Config() { int hr = 0; ITuningSpaceContainer tsContainer = (ITuningSpaceContainer) new SystemTuningSpaces(); ITuningSpace ts = null; // The third System TuningSpace is an ATSC one... // see HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Tuning Spaces\3 hr = tsContainer.get_Item(3, out ts); DsError.ThrowExceptionForHR(hr); tuningSpace = (IATSCTuningSpace)ts; Marshal.ReleaseComObject(tsContainer); }