AutoDialHangUp Method
Class: FTP_SERVICE
Closes a modem connection that was created from an AutoDialInternet function call.
=
Object.AutoDialHangUp
()
Return value Boolean
The return value is .T. if is disconnected from internet or .F. is not.
Example
LOCAL loFTP, liState,liResult
SET PROCEDURE TO ftp.prg ADDITIVE 
loFTP=CREATEOBJECT('ftp_service') 
liState=loFTP.GetConnectedState() && Check Connected state
IF liState=-1
   ?loFTP.GetExtendedErrorCode(),loFTP.GetExtendedErrorMsg()
   RETURN
ENDIF

IF BITTEST(liState,0) && Use Modem?
   liResult=loFTP.AutoDialInternet(0)
ENDIF

IF (BITTEST(liState,0) AND liResult=1 OR !BITTEST(liState,0)) AND ;
   loFTP.OpenInternet("ABONNE", "PWD", "10.10.10.10", "21") 
   * Try to get a handle into the Internet and Connect Briefly with the FTP Site 
   * Note: Insert your USER ID, PASSWORD, FTP ADDRESS, PORT # Here   
   * Note: ("21" is the Default Port) 
   ?"Connection réussie" 

   =loFTP.CloseInternet()
ENDIF
=loFTP.AutoDialHangUp()
RELEASE PROCEDURE ftp.prg
See also
Expand/Collapse source code of procedure AutoDialHangUp Source Code
      LOCAL fResult
      IF This.LoadAPIFuncs() != ERROR_SUCCESS
         RETURN .F.
      ENDIF    

      =This.BeforeAutoDialHangUp()
      fResult = InternetAutoDialHangUp(0)
      This.GetExtendedError()
      =This.AfterAutoDialHangUp(fResult)

      RETURN fResult # 0