Xceed FTP Library Documentation
XceedFtp control reference / Methods / ChangeUser method
In This Topic
    ChangeUser method
    In This Topic

    Description

    Changes the active user without disconnecting from the FTP server. This is useful when you want to change users but the connection to a server takes a long time to establish, or the number of simultaneous connections is limited and you do not want to risk your next connection being refused by the FTP server.

    Upon successful completion of this method, the UserName and Password properties automatically get updated.

    This method can only be used when the CurrentState property's value is fcsConnected.

    Parameters
     

    Parameter Description
    sUserName The new user name to log in
    sPassword  The password for the new user to log in

    Remarks

    Methods that send the PWD command do not report errors in the case where the PWD command fails.

    Declaration  
    HRESULT ChangeUser( [in] BSTR sUserName, [in] BSTR sPassword )

    Applicable properties

    AccountName, CurrentFolder, AutoRefreshCurrentFolder

    Events triggered

    LoggingCommandLine, ProcessCompleted