public static List <librpc.MemorySection> getMemorySections(librpc.ProcessInfo processInfo, librpc.VM_PROT protection = librpc.VM_PROT.RO) { var listMemoryEntries = new List <librpc.MemorySection>(); foreach (var memorySection in processInfo.listProcessMemorySections) { if ((memorySection.protection & protection) == protection) { listMemoryEntries.Add(memorySection); } } return(listMemoryEntries); }
public static librpc.MemorySection findMemorySectionByName(librpc.ProcessInfo processInfo, String sectionName, librpc.VM_PROT protection = librpc.VM_PROT.RO) { librpc.MemorySection result = null; foreach (var memorySection in processInfo.listProcessMemorySections) { if (memorySection.name == sectionName && (memorySection.protection & protection) == protection) { result = memorySection; break; } } return(result); }