public static extern ServiceError DNSServiceQueryRecord(out ServiceRef sdRef, ServiceFlags flags, uint interfaceIndex, string fullname, ServiceType rrtype, ServiceClass rrclass, DNSServiceQueryRecordReply callBack, IntPtr context);
public static ServiceError DNSServiceQueryRecord(out ServiceRef sdRef, ServiceFlags flags, uint interfaceIndex, string fullname, ServiceType rrtype, ServiceClass rrclass, DNSServiceQueryRecordReply callBack, IntPtr context) { switch (Native.GetCurrentOperatingSystem()) { case OperatingSystem.Windows: return(NativeWindows.DNSServiceQueryRecord(out sdRef, flags, interfaceIndex, fullname, rrtype, rrclass, callBack, context)); case OperatingSystem.OSX: return(NativeOSX.DNSServiceQueryRecord(out sdRef, flags, interfaceIndex, fullname, rrtype, rrclass, callBack, context)); default: throw new InvalidOperationException("The current OS is unsupported"); } }