Computing.Net > Forums > Programming > VB6 FTP hangs - Multithread needed?

VB6 FTP hangs - Multithread needed?

Reply to Message Icon

Original Message
Name: siteforge (by Greg Apel)
Date: December 17, 2005 at 12:32:43 Pacific
Subject: VB6 FTP hangs - Multithread needed?
OS: WinXP Pro
CPU/Ram: 800mhz AMD Duron
Comment:

My question is probably pretty basic.

While I am downloading via FTP using the wininet.dll, my application freezes until the download is complete. Then, it frees up the controls.

I think what I need is multithreading capability, to allow the download to proceed uninterrupted, and still let the user to click on command buttons, etc. without getting the "(program not responding)" in the form caption.

Any advice?


Report Offensive Message For Removal


Response Number 1
Name: Stephen Hall
Date: December 17, 2005 at 14:27:38 Pacific
Reply: (edit)

Greg,

I'm not really familiar with the wininet.dll or using VB to download stuff, but it sounds like you're on the right track. You might see if there is a way to call whatever function you call that hangs in an asynchronous way so as to avoid the complexity of making the new thread yourself. Some flag that has the word 'ASYNC' in it might exist for the particular function. If you're not sure exactly what function you hang on, step through the code in the debugger until the application "hangs", then you'll know which function you call that makes the hang occur. Good luck and keep us posted.

Stephen

"Live long and PROGRAM......or at least do _something_ with all that time...!"


Report Offensive Follow Up For Removal

Response Number 2
Name: SN
Date: December 19, 2005 at 07:09:28 Pacific
Reply: (edit)

I know how to do this in VB.NET, but not VB6...But this article seemed to have the information you need.

Good luck,
SN


Report Offensive Follow Up For Removal







Use following form to reply to current message:

   Name: From My Computing.Net Settings
 E-Mail: From My Computing.Net Settings

Subject: VB6 FTP hangs - Multithread needed?

Comments:

 


  Homepage URL (*): 
Homepage Title (*): 
         Image URL: 
 
Data Recovery Software




Have you ever used OpenOffice?

Yes, as my main suite.
Yes, occationally.
Yes, but only once.
No, never.


View Results

Poll Finishes In 3 Days.
Discuss in The Lounge