microsoft / win32metadata

Tooling to generate metadata for Win32 APIs in the Windows SDK.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Synthetic DNS_QUERY_OPTIONS enum encapsulates constants with differing types

riverar opened this issue · comments

DNS_QUERY_OPTIONS is currently a uint typed enum we emit that collects various DNS_QUERY_xxx loose constants. Some of these constants are larger than a uint.

#define DNS_QUERY_STANDARD                  0x00000000
#define DNS_QUERY_ACCEPT_TRUNCATED_RESPONSE 0x00000001
...
#define DNS_QUERY_RESERVED                  0xf0000000
...
#define DNS_QUERY_PARSE_ALL_RECORDS         0x0400000000000000

So to preserve code-gen ABI, I believe we need to return these constants to the wild.

Currently in enums.json

  {
    "name": "DNS_QUERY_OPTIONS",
    "type": "uint",
    "flags": true,
    "autoPopulate": {
      "header": "windns.h",
      "filter": "DNS_QUERY_"
    },
    "uses": [
      {
        "method": "DnsQuery_A",
        "parameter": "Options"
      },
      {
        "method": "DnsQuery_W",
        "parameter": "Options"
      },
      {
        "method": "DnsQuery_UTF8",
        "parameter": "Options"
      }
    ]
  },

Believe ISC_REQ_FLAGS also falls into this category.