Re: Downloading files using InternetReadFile() results in a timeout
Also found the following,
The max. fle size could be downloaded is around 120mb, it fails at 130mb
resulting a time out
I have increased set the ReceiveTimeOut to 600000ms(10 minutes) in the
but their is no improvement.
This was tested on WinXP SP2 with IE 7.0.5730.11
Could someone advice how to increase the timeout,
or is there any other funtion call which will enable this?
"DPM" <firstname.lastname@example.org> wrote in message
> I have an application whch downloads files from a server using
> InternetReadFile() of WinINet.dll
> When download files such as 1mb in size it works fine.
> But when downloading files with a size of about 160mb a timeout occurs and
> returns error code 12002
> The following timeout values are set before calling InternetReadFile(),
> DECLARE INTEGER InternetSetOption IN WININET.DLL INTEGER, INTEGER, INTEGER
> @, INTEGER
> dwTimeoutSecs = 600*1000
> InternetSetOption(hIPSession,INTERNET_OPTION_CONNE CT_TIMEOUT,@dwTimeoutSecs,4)
> InternetSetOption(hIPSession,INTERNET_OPTION_DATA_ RECEIVE_TIMEOUT,@dwTimeOutSecs,4)
> InternetSetOption(hIPSession,INTERNET_OPTION_DATA_ SEND_TIMEOUT,@dwTimeOutSecs,4)
> How do I do overcome this programetically without altering settings in the
> user's browser or registry?
> Is there anything more need to be set in the above function calls?
> Is there any other method to over come this error ?
> Please advice