cuff
April 27th, 2005, 03:05 AM
Hi all,
I'm trying to use WinINET to perform a few-web operations on one particular web-server. I need to be able to perform some of the operations synchronously and some asynchronously.
I created an Handle using INTERNET_FLAG_ASYNC handle in InternetOpen, set a status callback function, connected to the server using InternetConnect with a flag INTERNET_FLAG_KEEP_CONNECTION.
Now according to WinINET documentation, if open a web-request using HttpOpenRequest with non-zero context value, the operation should perform asynchronously and if I use zero context value, it should perform synchronously.
However, irrespective of what context value I use, the subsequent HttpSendRequest throws an error ERROR_IO_PENDING. This is expected in asynchronous mode but not in synchronous mode.
Is it that, if I use INTERNET_FLAG_ASYNC in InternetOpen, all the HttpOpenRequest I make on the handle returned would invariably perform asynchronously irrespective of context value!!
Thanks in advance
Omprakash
I'm trying to use WinINET to perform a few-web operations on one particular web-server. I need to be able to perform some of the operations synchronously and some asynchronously.
I created an Handle using INTERNET_FLAG_ASYNC handle in InternetOpen, set a status callback function, connected to the server using InternetConnect with a flag INTERNET_FLAG_KEEP_CONNECTION.
Now according to WinINET documentation, if open a web-request using HttpOpenRequest with non-zero context value, the operation should perform asynchronously and if I use zero context value, it should perform synchronously.
However, irrespective of what context value I use, the subsequent HttpSendRequest throws an error ERROR_IO_PENDING. This is expected in asynchronous mode but not in synchronous mode.
Is it that, if I use INTERNET_FLAG_ASYNC in InternetOpen, all the HttpOpenRequest I make on the handle returned would invariably perform asynchronously irrespective of context value!!
Thanks in advance
Omprakash