The SetSecondaryDnsServer method sets the IP address of the secondary DNS server of the network adapter.
HRESULT SetSecondaryDnsServer( [in] BSTR newVal );
Required. BSTR that specifies the IP address of the secondary DNS server to set for the network adapter.
This method returns S_OK if the call is successful; otherwise, it returns an error code.
Sub SetSecondaryDnsServer( _ ByVal newVal As String _ )
Required. String that specifies the IP address of the secondary DNS server to set for the network adapter.
This method has no return values. If the call is unsuccessful, an error is raised that can be intercepted by using an error handler.
The current IP address of the secondary DNS server of the network adapter can be retrieved by calling the GetSecondaryDnsServer method.
Client | Requires Windows Vista or Windows XP. |
---|---|
Server | Requires Windows Server 2008. |
Version | Requires Forefront Threat Management Gateway (TMG). |
IDL |
Declared in Msfpccom.idl. |
DLL |
Requires Msfpccom.dll. |
Send comments about this topic to Microsoft
Build date: 11/30/2009
© 2008 Microsoft Corporation. All rights reserved.