Hello,

I am setting the timeout value for my HTTP handle using the above method. The problem is whatever value I put e.g. 1ms, the connection is never timedout even if the process of executing and getting the result takes more then 1ms.

From MSDN:

INTERNET_OPTION_CONNECT_TIMEOUT
Sets or retrieves an unsigned long integer value that contains the time-out value to use for Internet connection requests. Units are in milliseconds. If a connection request takes longer than this time-out value, the request is canceled. When attempting to connect to multiple IP addresses for a single host (a multihome host), the timeout limit is cumulative for all of the IP addresses. This option can be used on any HINTERNET handle, including a NULL handle. It is used by InternetQueryOption and InternetSetOption.
I am using the following code:

Code:
	bool ret = InternetSetOption ( m_InternetConnect, INTERNET_OPTION_CONNECT_TIMEOUT, &timeout, sizeof(timeout) );
	assert ( ret );
It never fails in assert also?

Am I doing anything wrong...

Regards,
Karam