pub const QUERY = packed struct(ULONG64) ACCEPT_TRUNCATED_RESPONSE: bool = falseUSE_TCP_ONLY: bool = falseNO_RECURSION: bool = falseBYPASS_CACHE: bool = falseNO_WIRE_QUERY: bool = falseNO_LOCAL_NAME: bool = falseNO_HOSTS_FILE: bool = falseNO_NETBT: bool = falseWIRE_ONLY: bool = falseRETURN_MESSAGE: bool = falseMULTICAST_ONLY: bool = falseNO_MULTICAST: bool = falseTREAT_AS_FQDN: bool = falseADDRCONFIG: bool = falseDUAL_ADDR: bool = falseReserved15: u2 = 0MULTICAST_WAIT: bool = falseMULTICAST_VERIFY: bool = falseReserved19: u1 = 0DONT_RESET_TTL_VALUES: bool = falseDISABLE_IDN_ENCODING: bool = falseReserved22: u1 = 0APPEND_MULTILABEL: bool = falseReserved24: u34 = 0PARSE_ALL_RECORDS: bool = falseReserved59: u5 = 01612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673 pub const QUERY = packed struct(ULONG64) {
pub const STANDARD: QUERY = .{};
ACCEPT_TRUNCATED_RESPONSE: bool = false,
USE_TCP_ONLY: bool = false,
NO_RECURSION: bool = false,
BYPASS_CACHE: bool = false,
NO_WIRE_QUERY: bool = false,
NO_LOCAL_NAME: bool = false,
NO_HOSTS_FILE: bool = false,
NO_NETBT: bool = false,
WIRE_ONLY: bool = false,
RETURN_MESSAGE: bool = false,
MULTICAST_ONLY: bool = false,
NO_MULTICAST: bool = false,
TREAT_AS_FQDN: bool = false,
ADDRCONFIG: bool = false,
DUAL_ADDR: bool = false,
Reserved15: u2 = 0,
MULTICAST_WAIT: bool = false,
MULTICAST_VERIFY: bool = false,
Reserved19: u1 = 0,
DONT_RESET_TTL_VALUES: bool = false,
DISABLE_IDN_ENCODING: bool = false,
Reserved22: u1 = 0,
APPEND_MULTILABEL: bool = false,
Reserved24: u34 = 0,
PARSE_ALL_RECORDS: bool = false,
Reserved59: u5 = 0,
pub const REQUEST = extern struct {
Version: DWORD,
QueryName: PCWSTR,
QueryType: TYPE,
QueryOptions: QUERY = .STANDARD,
pDnsServerList: ?*ADDR.ARRAY = null,
InterfaceIndex: ULONG = 0,
pQueryCompletionCallback: ?*const COMPLETION_ROUTINE = null,
pQueryContext: ?*anyopaque = null,
pub const @"3" = extern struct {
Base: REQUEST,
IsNetworkQueryRequired: BOOL = .FALSE,
RequiredNetworkIndex: DWORD = 0,
cCustomServers: DWORD = 0,
pCustomServers: ?*CUSTOM_SERVER = null,
};
};
pub const RESULT = extern struct {
Version: ULONG,
QueryStatus: STATUS,
QueryOptions: QUERY,
pQueryRecords: ?*RECORD,
Reserved: ?*anyopaque,
};
pub const CANCEL = extern struct {
Reserved: [32]CHAR align(8),
};
pub const COMPLETION_ROUTINE = fn (
pQueryContext: ?*anyopaque,
pQueryResults: *RESULT,
) callconv(.winapi) void;
}