In any case, adding in logic to typegen_detect_type seems the easiest way.
Sure but it's incorrect to return `TGT_CTXT_HANDLE_POINTER`, which has more uses than just these checks.
I think something like that in check_field_common works:
```C case TGT_POINTER: if (type_get_type(type_pointer_get_ref_type(type)) != TYPE_VOID || !type->name || strcmp(type->name, "HANDLE")) { type = type_pointer_get_ref_type(type); more_to_do = TRUE; } break; ```