[RESOLVED] Vb6.0 and Wininet.dll
Hi.
A while ago I had the need to send and / or receive files via ftp in a VB6.0. To do this I had recovered from a class VB network that uses the API Wininet.dll (from www.VBIP.COM). The code has been working well and continues to operate. The problem is that when I download or upload large files or the number of files is high, the transfer of files takes all the resources of the system and you can not do anything: we must wait until the transfer is finished to be able to launch any other application. It seems that the problem is class specific, but rather of the Wininet.ddl. I downloaded and tried several other examples from the network employing the same dll and give everyone the same problem.
Someone knows why and how to solve?
Thank you.
Re: Vb6.0 and Wininet.dll
Ok so basically you are saying this:
"I downloaded someone else's dll and I am having a problem with it. why?"
.... How can we possibly have a solution based on that? Apparently the dll is coded wrong to not allow other processes to work (maybe a doevents, a flawed loop. who knows?). Without seeing the code it is impossible to point you at the problem.
Re: Vb6.0 and Wininet.dll
You could try something like this:
Private Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)
Private Sub FTP_Wait()
Do
DoEvents
Sleep 50
Loop Until (Me.INET1.StillExecuting = False)
End Sub
and call FTP_Wait after each call of the internet transfer control's execute method...
We used this code with some level of success. Eventually we had enough problems with really big files that we purchased a 3rd party FTP control. That solved all our problems.
4 Attachment(s)
Re: Vb6.0 and Wininet.dll
Hello, danecook21.
I attach the UserControl that uses the API WININET.DLL hoping that may help identify the problem. Thank you.
Re: Vb6.0 and Wininet.dll
Quote:
Originally Posted by rw
You could try something like this:
Private Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)
Private Sub FTP_Wait()
Do
DoEvents
Sleep 50
Loop Until (Me.INET1.StillExecuting = False)
End Sub
and call FTP_Wait after each call of the internet transfer control's execute method...
We used this code with some level of success. Eventually we had enough problems with really big files that we purchased a 3rd party FTP control. That solved all our problems.
Hello, rw. I thank you for your help, try your solution.