Help with Wininet.My project is like freeze when i am downloading file from internet

I am using Wininet for downloadng files from internet.When i start with downloading hole project  is freezing up.While buffer (in InternetReadFile )  is loading  hole project is freezed and after that project is litle bit released and then again hole project is freezed.I thried with small buffer (256,1024) and with "Application.Processmessage" function but problem is not solved.  
nikola_mkAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
JDuncanConnect With a Mentor Commented:
Are you using some thing like the following the following

      InternetReadFile(handle,addr(mybuffer),sizeof(mybuffer),DataLen);
     for i:=0 to 100 do  Application.ProcessMessage;

The effect changing the buffer size has will depend on the tcp routing buffer (around 1024 bytes of data).

You could try putting multiple appprocess messages in a for loop as above
0
All Courses

From novice to tech pro — start learning today.