private void readPropModListToolStripMenuItem_Click(object sender, EventArgs e) { try { ClearAll(); GetHandle(); GetStartAddress(); if (handle == IntPtr.Zero || address == 0) { return; } GRPStaticList list = new GRPStaticList(); Log("Count = " + (list.count = ReadDWORD(handle, address + 4))); Log("Capacity = " + (list.capacity = ReadDWORD(handle, address + 8))); Log("List Pointer = " + (list.pList = ReadDWORD(handle, address + 12)).ToString("X8")); if (list.capacity > 100) { throw new Exception("Unexpected huge capacity!"); } if (list.count > list.capacity) { list.count = list.capacity; } list.elements = new uint[list.capacity]; Log("Elements"); Log("========"); for (uint i = 0; i < list.capacity; i++) { list.elements[i] = ReadDWORD(handle, list.pList + i * 4); if (list.elements[i] == 0) { continue; } PropNode p = ReadPropNode(handle, list.elements[i]); TreeNode t = new TreeNode(); AddPropNode(t, p); treeView1.Nodes.Add(t); } } catch (Exception ex) { Log("Error : " + ex.Message); } }
private void readStaticListToolStripMenuItem_Click(object sender, EventArgs e) { try { ClearAll(); GetHandle(); GetStartAddress(); if (handle == IntPtr.Zero || address == 0) { return; } GRPStaticList list = new GRPStaticList(); Log("Count = " + (list.count = ReadDWORD(handle, address + 4))); Log("Capacity = " + (list.capacity = ReadDWORD(handle, address + 8))); Log("List Pointer = " + (list.pList = ReadDWORD(handle, address + 12)).ToString("X8")); if (list.capacity > 100) { throw new Exception("Unexpected huge capacity!"); } if (list.count > list.capacity) { throw new Exception("Count bigger than capacity!"); } list.elements = new uint[list.capacity]; Log("Elements"); Log("========"); for (uint i = 0; i < list.capacity; i++) { list.elements[i] = ReadDWORD(handle, list.pList + i * 4); string s = i.ToString("D2") + " : " + list.elements[i].ToString("X8"); listBox1.Items.Add(s); Log(s); } } catch (Exception ex) { Log("Error : " + ex.Message); } }