Re: Download multiple files concurrently using WinHttpRequest
- From: Ulrich Korndoerfer <ulrich_wants_nospam@xxxxxxxxxxxx>
- Date: Tue, 16 Jun 2009 12:46:15 +0200
Hi,
Nobody schrieb:
If there are any objections against having such much connections open for a considerable long time (the app may run for hours, but not necessarily download data all the time), what should I do? Am I missing something in serving the objects that could stop this behavior?
Are you calling WinHttpCloseHandle() when done?
Servers operators do not like keeping connections open without using them. They use some resources. They most likely ban the IP that these connections are coming from.
Good to know. However I use the WinHttpRequest COM object, which does not offer a CloseHandle method. WinHttpCloseHandle is an API method. Normally, when tearing down an object, it should release its ressources too, including those adressed by handles. This is the reason why I create and destroy for every download a WinHttpRequest object. But seemingly the WinHttpRequest object does not do this. I think I even can not get this handle from the object, so I can not resort to free it before destroying the object. And if I could get this handle from the object, it probably would not be good to mix object driven access and API calls.
--
Ulrich Korndoerfer
VB tips, helpers, solutions -> http://www.proSource.de/Downloads/
.
- Follow-Ups:
- References:
- Download multiple files concurrently using WinHttpRequest
- From: Ulrich Korndoerfer
- Re: Download multiple files concurrently using WinHttpRequest
- From: Nobody
- Download multiple files concurrently using WinHttpRequest
- Prev by Date: Re: JPEG File Compression
- Next by Date: Re: VB writing image to MS Word doc
- Previous by thread: Re: Download multiple files concurrently using WinHttpRequest
- Next by thread: Re: Download multiple files concurrently using WinHttpRequest
- Index(es):