IFPCServer3::SetServerName method

Applies to: desktop apps only

The SetServerName method sets the computer name of the server, and restarts the computer to apply the change if requested.

Syntax

HRESULT SetServerName(
  [in]            BSTR Name,
  [in]            String Name,
  [in, optional]  VARIANT_BOOL RestartNow,
  [in, optional]  Boolean RestartNow,
  [in, optional]  BSTR DomainUserName,
  [in, optional]  String DomainUserName,
  [in, optional]  BSTR DomainUserPassword,
  [in, optional]  String DomainUserPassword
);
FPCServer.SetServerName( _
  ByVal Name As BSTR, _
  ByVal Name As String, _
  [ ByVal RestartNow As VARIANT_BOOL ], _
  [ ByVal RestartNow As Boolean ], _
  [ ByVal DomainUserName As BSTR ], _
  [ ByVal DomainUserName As String ], _
  [ ByVal DomainUserPassword As BSTR ], _
  [ ByVal DomainUserPassword As String ] _
)

Parameters

  • Name [in]

    C++

    Required. BSTR that specifies the name of the computer.

    VB

    Required. String that specifies the name of the computer.

  • RestartNow [in, optional]

    C++

    Boolean value that indicates whether to restart the computer after the method completes.

    VB

    Boolean value that indicates whether to restart the computer after the method completes.

  • DomainUserName [in, optional]

    C++

    BSTR that specifies the domain user name.

    VB

    String that specifies the domain user name.

  • DomainUserPassword [in, optional]

    C++

    BSTR that specifies the domain password of the user.

    VB

    String that specifies the domain password of the user.

Return value

C++

This method returns S_OK if the call is successful; otherwise, it returns an error code.

VB

If the call is unsuccessful, an error is raised that can be intercepted by using an error handler.

Remarks

The computer must be restarted to apply the change.

Requirements

Minimum supported client

Windows Vista

Minimum supported server

Windows Server 2008 R2, Windows Server 2008 with SP2 (64-bit only)

Version

Forefront Threat Management Gateway (TMG) 2010

IDL

Msfpccom.idl

DLL

Msfpccom.dll

See also

FPCServer

 

 

Build date: 7/12/2010