Rémi Bernon (@rbernon) commented about tools/widl/typegen.c:
(is_attr(attrs, ATTR_RANGE) || is_aliaschain_attr(type, ATTR_RANGE))) return TGT_RANGE; return TGT_ENUM;
- case TYPE_VOID:
case TYPE_POINTER:return TGT_CTXT_HANDLE_POINTER;
Instead of returning `TGT_CTXT_HANDLE` when type is void, which will then make void parameters incorrectly succeed some checks, I'd suggest adding some logic in the `TYPE_POINTER` case, checking whether the type is an alias to `void*` which name is `HANDLE`.
Probably the simplest thing to do, is to add it to the `TYPE_POINTER` case in check_field_common, to avoid overloading the `TGT_CTXT_HANDLE` meaning, or having to add a specific `TGT_HANDLE` value.
Note that this is a problem only because we're trying to use an IDL here. As far as I can see, the SDK doesn't have one and uses a .h directly instead (though it's probably fine and cleaner to use an IDL).