Global Type F_Connect_ftpserver from function_Objectnd Type
Forward PrototypeSGLobal Function Integer f_connect_ftpserver () end prototypes
Global Function Integer F_Connect_ftpserVer (); long ll_hretlong ll_hftpinteger li_ret = -1
Do while yield () loop
Ll_hret = Internetopena (GS_Application_Name, 0, '', '', 0) IF LL_HRET = 0 or ISNULL (LL_HRET) THEN / / MESSAGEBOX ('error!', 'lack of dynamic connection library Wininet.dll!', stopsign!) Return li_retend ifll_hftp = InternetConnectA (ll_hret, GS_FTPSERVER1, GL_FTPLOGINPORT1, GS_FTPLOGINUSER1, GS_FTPLOGINPASS1,1,0,0) if ll_hftp = 0 then ll_hftp = InternetConnectA (ll_hret, GS_FTPSERVER2, GL_FTPLOGINPORT2, GS_FTPLOGINUSER2, GS_FTPLOGINPASS2,1,0,0) if ll_hftp = 0 then ll_hftp = InternetConnectA (ll_hret, GS_FTPSERVER3, GL_FTPLOGINPORT3, GS_FTPLOGINUSER3, GS_FTPLOGINPASS3,1,0,0) if ll_hftp = 0 then InternetCloseHandle (ll_hret) return li_ret ELSE li_ret = 3 END IF ELSE li_ret = 2 END IFelse li_ret = 1end ifInternetCloseHandle (ll_hret ) InternetCloseHandle (LL_HFTP) RETURN Li_Ret
END FUNCTION