private void TestTuningSpacesForName() { int hr = 0; ITuningSpace ts; string uniqueName; ITuningSpaces tsColl; int count; hr = tsContainer.get_Item(1, out ts); DsError.ThrowExceptionForHR(hr); hr = ts.get_UniqueName(out uniqueName); DsError.ThrowExceptionForHR(hr); Marshal.ReleaseComObject(ts); // Do a seach with this unique name. We should at least have 1 entry in the returned collection hr = tsContainer.TuningSpacesForName(uniqueName, out tsColl); DsError.ThrowExceptionForHR(hr); Debug.Assert((hr == 0) && (tsColl != null), "ITuningSpaceContainer.TuningSpacesForName"); hr = tsColl.get_Count(out count); DsError.ThrowExceptionForHR(hr); Debug.Assert(count >= 1, "ITuningSpaceContainer.TuningSpacesForName"); Marshal.ReleaseComObject(tsColl); }