Dear Antonio,
I faced a problem with TInternet.
I have a program which is downloading files from the internet. But when I update a file online the program still downloads the old version.
I felt that the content must be somewhere in a buffer.
Now looking into TInternet class it seems to me as there classdata hWinINet and aFTPs is not released.
If I make following changes for me all is working.
I am not very experienced with this class. Can someone please check.
Thanks in advance
Otto
I faced a problem with TInternet.
I have a program which is downloading files from the internet. But when I update a file online the program still downloads the old version.
I felt that the content must be somewhere in a buffer.
Now looking into TInternet class it seems to me as there classdata hWinINet and aFTPs is not released.
If I make following changes for me all is working.
I am not very experienced with this class. Can someone please check.
Thanks in advance
Otto
METHOD New() CLASS TInternet
local hWinINet := WinINet()
::hWinINet := hWinINet //Otto
if hWinINet < 0 .or. hWinINet >= 32
::hSession = InternetOpen( "FW", 0, 0, 0, 0 )
endif
return Self
//----------------------------------------------------------------------------//
METHOD End() CLASS TInternet
xbrowse(::aFTPs)
xbrowse(::hWinINet)
#ifdef __CLIPPER__
ASend( ::aFTPs, "End" )
#else
ASend( ::aFTPs, "End()" )
#endif
if ::hSession != nil
InternetCloseHandle( ::hSession )
::hSession = nil
::hWinINet = nil //Otto
::aFTPs := {} //Otto
endif
return nil