/// <devdoc> /// Given an IEnumVariant interface, this method jumps to a specific /// item in the collection and extracts the result for that one item. /// </devdoc> private static bool GotoItem(UnsafeNativeMethods.IEnumVariant iev, int index, IntPtr variantPtr) { int[] ns = new int[1]; // SECREVIEW: This assert is safe, and is needed to fix VSWhidbey#126319 // (allow access to children of an AccessibleObject in partial trust). // IntSecurity.UnmanagedCode.Assert(); try { iev.Reset(); iev.Skip(index); iev.Next(1, variantPtr, ns); } finally { CodeAccessPermission.RevertAssert(); } return (ns[0] == 1); }