Click to See Complete Forum and Search --> : Attention gurus : Help with Inet control : generates multiple "winoldap" sessions ...


yfh
March 15th, 1999, 10:25 AM
Hello,

I have the following problem :

I use inet control (VB5) for downloading a small text file from FTP.

I use a fixed number of attempts(10) for successing, after which i consider download unsuccessfull if I end with some error.

At each try (or attempt), i use "cancel" method after the attempt


Whenever there is a problem, i have noticed that the control leaves in the system a lot of "winoldap" active sessions. And they end up crashing the program.


Is there anything I can do ?


TIA


Yfh

mohitrao
May 31st, 2000, 12:44 AM
I do have a similar problem, with inet control .I want to load an image[jpg,bmp,gif] from web server
The downloaded image with the use of Inet control
is not at all visible in Internet explorer,since if the original image size is 200x300 pixels
the downloaded image size around 7x8 pixels


I am writing the code ,if there is any problem please do feel free to write me at mohit_rao@usa.net


private Sub Form_Load()
Dim pname as string
pname = "sbserver"
Inet1.Proxy = pname
Inet1.AccessType = icNamedProxy
Text1.Text = Inet1.OpenURL("http://go.msn.com/zzs/0/b.asp")

'Inet1.OpenURL("http://sbserver/ealbums/Gallery_act/ashphtogal10.jpg")
Dim strURL as string ' URL string
' FreeFile variable
Inet1.Execute "http://sbserver/ealbums/members/raomohit/10_act/aish118.jpg", "get"
Inet1.UserName = "mohit"
End Sub

private Sub Inet1_StateChanged(byval State as Integer)

' Retrieve server res ponse using the GetChunk
' method when State = 12. This example assumes the
' data is text.
Dim vtData as Variant ' Data variable.
Dim intfile as Integer
intfile = FreeFile()

Select Case State
' ... Other cases not shown.
Case icResponseCompleted ' 12
' Open a file to write to.
Open "c:\txtOperation1.jpg" for binary Access _
Write as #intfile

' get the first chunk. NOTE: specify a Byte
' array (icByteArray) to retrieve a binary file.
vtData = Inet1.GetChunk(1024, icByteArray)

Do While (len(vtData) > 0)
Put #intfile, , vtData
' get next chunk.
vtData = Inet1.GetChunk(1024, icByteArray)
Loop
Put #intfile, , vtData
Close #intfile
End Select
Image1.Picture = LoadPicture("c:\txtoperation1.jpg")

End Sub