private ClassHierarchyDescriptor ReadClassHierarchyDescriptor(IntPtr pClassDescriptor) { ClassHierarchyDescriptor.MemoryStruct memoryStruct = new ClassHierarchyDescriptor.MemoryStruct(); processMemoryReader.ReadStruct(pClassDescriptor, ref memoryStruct); if (memoryStruct.Signature != 0) { throw new InvalidDataException("Invalid class hierarchy signature"); } ClassHierarchyDescriptor desc = new ClassHierarchyDescriptor( new List <BaseClassDescriptor>((int)memoryStruct.numBaseClasses), memoryStruct.Flags ); IntPtr[] baseDescriptorPointers = processMemoryReader.ReadIntPtrArray(memoryStruct.pBaseClassArray, memoryStruct.numBaseClasses); for (uint baseClassIndex = 0; baseClassIndex < memoryStruct.numBaseClasses; ++baseClassIndex) { desc.BaseClasses.Add(ReadBaseClassDescriptor(baseDescriptorPointers[baseClassIndex])); } ; return(desc); }