コード例 #1
0
 public static extern ServiceError DNSServiceQueryRecord(out ServiceRef sdRef,
                                                         ServiceFlags flags,
                                                         uint interfaceIndex,
                                                         string fullname,
                                                         ServiceType rrtype,
                                                         ServiceClass rrclass,
                                                         DNSServiceQueryRecordReply callBack,
                                                         IntPtr context);
コード例 #2
0
        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");
            }
        }
コード例 #3
0
 public static extern ServiceError DNSServiceQueryRecord(out ServiceRef sdRef, ServiceFlags flags, 
     uint interfaceIndex, string fullname, ServiceType rrtype, ServiceClass rrclass, 
     DNSServiceQueryRecordReply callBack, IntPtr context);