DialHangUp Method
Class: FTP_SERVICE
Closes a dialup connection that was created from a DialInternet function call.
=
Object.DialHangUp
Parameter
lnConnectionID
Handle returned from the FTP_SERVICE::AutoDialInternet() Function Call.
Type Numeric
Direction Input
Return value Boolean
The return value is .T. if is disconnected from internet or .F. is not.
Example
LOCAL loFTP, liState,liCID
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?
   liCID=loFTP.DialInternet("MACONNEXION",1) 
ENDIF

IF (BITTEST(liState,0) AND liCID>0 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.DialHangUp(liCID) 
RELEASE PROCEDURE ftp.prg
See also
Expand/Collapse source code of procedure DialHangUp Source Code
      LPARAMETERS INP lnConnectionID
      LOCAL fResult
      IF This.LoadAPIFuncs() != ERROR_SUCCESS
         RETURN .F.
      ENDIF

      IF TYPE("lnConnectionID") != "N"
         RETURN .F.
      ENDIF

      =This.BeforeDialHangUp(lnConnectionID)
      fResult = InternetHangUp(lnConnectionID, 0)
      This.GetExtendedError()
      =This.AfterDialHangUp(lnConnectionID,fResult)
      RETURN fResult # 0