# set\_member\_type

Change structure member type.

This function can be used in two forms. First form: long set\_member\_type(long id, long member\_offset, long flag, long typeid, long nitems);

Second form: long set\_member\_type(long id, long member\_offset, long flag, long typeid, long nitems, long target, long tdelta, long reftype);

arguments: id - structure type ID member\_offset - offset of the member flag - new type of the member. Should be one of FF\_BYTE..FF\_PACKREAL (see above) combined with FF\_DATA typeid - if is\_struct(flag) then typeid specifies the structure id for the member if is\_off0(flag) then typeid specifies the offset base. if is\_strlit(flag) then typeid specifies the string type ([STRTYPE\_...](/9.0/developer-guide/idc/idc-api-reference/alphabetical-list-of-idc-functions/283.md)). if is\_stroff(flag) then typeid specifies the structure id if is\_enum(flag) then typeid specifies the enum id Otherwise typeid should be -1 nitems - number of items in the member the remaining arguments are allowed only if [is\_off0(flag)](/9.0/developer-guide/idc/idc-api-reference/alphabetical-list-of-idc-functions/181.md) and you want to specify a complex offset expression: target - target address of the offset expr. You may specify it as -1, ida will calculate it itself tdelta - offset target delta. usually 0 reftype - see REF\_... definitions returns: !=0 - ok.

long set\_member\_type(long id, long member\_offset, long flag, long typeid, long nitems, long target, long tdelta, long reftype);


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.hex-rays.com/9.0/developer-guide/idc/idc-api-reference/alphabetical-list-of-idc-functions/401.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
