Over the IDA Gui it is possible to export a structure with dependencies to a header file. For example if I export a struct that has one member from type DWORD than the header file also contains "typedef unsigned int DWORD".
I want to do a similar task with the python api.
def get_member_type(struct, idx):
member = ida_struct.get_member(struct, idx)
tif = tinfo_t()
ida_struct.get_member_tinfo(member, tif)
return tif
This function return the type of the struct members for example "DWORD" but how can I get the information that this is a unsigned int?