DNSServer Property

The address of the DNS server.

Syntax

ANSI (Cross Platform)
char* GetDNSServer();
int SetDNSServer(const char* lpszDNSServer); Unicode (Windows) LPWSTR GetDNSServer();
INT SetDNSServer(LPCWSTR lpszDNSServer);
@property (nonatomic,readwrite,assign,getter=DNSServer,setter=setDNSServer:) NSString* DNSServer;
- (NSString*)DNSServer;
- (void)setDNSServer:(NSString*)newDNSServer;
#define PID_DNS_DNSSERVER 2

IPWORKS_EXTERNAL void* IPWORKS_CALL IPWorks_DNS_Get(void *lpObj, int propid, int arridx, int *lpcbVal, int64 *lpllVal);
IPWORKS_EXTERNAL int IPWORKS_CALL IPWorks_DNS_Set(void *lpObj, int propid, int arridx, const void *val, int cbVal);

Default Value

""

Remarks

This property contains the address of the DNS server. The class attempts to find the default DNS server for the machine where it is installed, and provide it in the DNSServer property. You may later change it to any particular DNS server you want to query. While any internet host running a DNS service will suffice, it is preferable to use either the DNS server for your network or the DNS server for the domain which you are querying.

If the class cannot determine the default DNS server address, the property value will be an empty string.

NOTE: Automatic discovery of the default DNS server is not supported in the Java edition.

This property is not available at design time.

Data Type

String

Copyright (c) 2022 /n software inc. - All rights reserved.
IPWorks 2020 C++ Edition - Version 20.0 [Build 8307]