DialInternet Method
Class: FTP_SERVICE
Attempts to use a preconfigured Dial Up account to connect to the internet.
=
Object.DialInternet
Parameter
lcDialUpName
Name of the DialUp Connection to use.
Type Character
Direction Input
lnFlag
Type Numeric
Direction Input
ValueDescription
INTERNET_AUTODIAL_FORCE_ONLINE Forces an online Internet connection.
INTERNET_AUTODIAL_FORCE_UNATTENDED Forces an unattended Internet dial-up.
INTERNET_AUTODIAL_FAILIFSECURITYCHECK Causes InternetAutodial to fail if file and printer sharing is disabled for Windows 95 or later.
Assumed from MSDN.
Return value Integer
Connection handle number. 0 if API Call unsuccessful or -1 if foxpro function failed.
See also
Expand/Collapse source code of procedure DialInternet Source Code
      LPARAMETERS lcDialUpName, lnFlag
      LOCAL fResult, lnConnectionID, lnHWNDHandle
      IF This.LoadAPIFuncs() != ERROR_SUCCESS
         RETURN -1
      ENDIF

      STORE 0 TO lnConnectionID,lnHWNDHandle

      IF TYPE("lcDialUpName") != "C" OR ;
         TYPE("lnFlag") != "N"
         RETURN -1
      ENDIF

      IF LEN(ALLTRIM(lcDialUpName)) = 0 
         RETURN -1
      ENDIF

      lcDialUpName = lcDialUpName + cNULL
      =This.BeforeDialInternet(lcDialUpName, lnFlag)
      fResult = InternetDial(lnHWNDHandle, @lcDialUpName, lnFlag, @lnConnectionID, 0)
      =This.GetExtendedError()
      =This.AfterDialInternet(lcDialUpName, lnFlag,lnConnectionID,fResult)
      RETURN lnConnectionID