Closed Byzero512 closed 2 weeks ago
The proto type for ctree_item_t.get_memptr in cpp is:
inline member_t *ctree_item_t::get_memptr(struc_t **p_sptr) const { return (member_t *)HEXDSP(hx_ctree_item_t_get_memptr, this, p_sptr); }
So I call it from idapython with these code:
import ida_hexrays import idaapi class tester(ida_hexrays.Hexrays_Hooks): def __init__(self): ida_hexrays.Hexrays_Hooks.__init__(self) def keyboard(self, vu, key_code, shift_state): vu.get_current_item(0) st = idaapi.struc_t() a = vu.item.get_memptr(x, st) return 0 x = tester() x.hook()
But I will get the error below:
raise AttributeError("No constructor defined").
raise AttributeError("No constructor defined")
How can I set the p_sptr argument correctly?
Thank you for reply!
The proto type for ctree_item_t.get_memptr in cpp is:
So I call it from idapython with these code:
But I will get the error below:
raise AttributeError("No constructor defined")
.How can I set the p_sptr argument correctly?
Thank you for reply!