public IEnumerable <HeapBlock> EnumHeapBlocks() { var entry = new HeapEntry(); entry.Init(); if (!Win32.Heap32First(ref entry, _pid, _heap.HeapId)) { yield break; } do { yield return(new HeapBlock(entry)); } while (Win32.Heap32Next(ref entry)); }
internal static extern bool Heap32Next(ref HeapEntry he);
internal static extern bool Heap32First(ref HeapEntry he, int pid, IntPtr heapId);
internal HeapBlock(HeapEntry entry) { _entry = entry; }