Topic created on: February 21, 2007 08:21 CST by
bitmanmb 
.
Hi there.
I am looking to port an IDC script to IDA plugin. But I got a problem with the script function MakeStructEx(long ea,long size, string strname) which seems not to have an equivalent one for plugin. I suppose there is a clever solution I didn't realized.
Could somebody help me?
Thx
Well actually I create my structures this way but when I want to assign one of them to an EA in my disassembly I have no results.
A sample piece of my code:
#define struct_dword 0x20000400
enum_t id = 0;
struc_t *sptr = NULL;
typeinfo_t mt;
id = get_struc_id("MyStruct");
sptr = get_struc(id);
add_struc_member(sptr, "dwField1", 0x00, struct_dword, &mt, 4);
add_struc_member(sptr, "dwField2", 0x04, struct_dword, &mt, 4);
add_struc_member(sptr, "dwField3", 0x08, struct_dword, &mt, 4);
...
now I want to represent data at address 0x401050 as MyStruct. How could I do it?
Thanks!
|