What would most likely cause this error?

 

Hi

I have an EA with that uses FTP to get certain data, sometimes I find this error comes up and I have to restart the terminal to correct it, can anyone comment on the causes of this error:

   int hSession = InternetOpenA(AGENT, INTERNET_OPEN_TYPE_DIRECT, "0", "0", 0);
   if(hSession <= 0){
     Print("Error when calling InternetOpenA()");
     return(1003);         
   }    

PS I am new to coding.

Thanks

Antony

 

tonyjms2005:

I have an EA with that uses FTP to get certain data, sometimes I find this error comes up and I have to restart the terminal to correct it, can anyone comment on the causes of this error:

  1. PS I am new to coding.
    This is a VERY advanced call.
  2. Not running under Windows Mobile 6.5.
  3. No network connections yet, not checking InternetCheckConnection
  4. Not closing all handles with InternetCloseHandle