private int GetPointerSize() { _enumUTDs.Reset(); foreach (IDiaSymbol sym in _enumUTDs) { if (sym.name == "_LIST_ENTRY") { Symbol s = new Symbol(sym); return((int)s.Length / 2); } } // since it isn't possible for a pointer size to be zero, this indicates a failure return(0); }
/// <summary> /// Converts <see cref="IDiaEnumSymbols"/> container to <see cref="IEnumerable{IDiaSymbol}"/>. /// </summary> /// <param name="container">The container.</param> public static IEnumerable <IDiaSymbol> Enum(this IDiaEnumSymbols container) { IDiaSymbol[] tempSymbols = new IDiaSymbol[1]; container.Reset(); while (true) { uint count; container.Next((uint)tempSymbols.Length, tempSymbols, out count); if (count == 0) { break; } yield return(tempSymbols[0]); } }