Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

redirection using WinInet

18 views
Skip to first unread message

koroppo

unread,
Aug 11, 2008, 10:10:03 AM8/11/08
to
I am programming under VS2005. I need to implement redirection of URL in my
own project. I plan to use WinInet function--- InternetSetStatusCallback()
and capture the INTERNET_STATUS_REDIRECT in the callback function.
After searching on MSDN, I got the following:
INTERNET_STATUS_REDIRECT:An HTTP request is about to automatically redirect
the request. The lpvStatusInformation parameter points to the new URL. At
this point, the application can read any data returned by the server with the
redirect response and can query the response headers. It can also cancel the
operation by closing the handle.

1 Can I implement this only in async mode or sync/async both.
2 In the callback function I implement, what should I do? Need I fetch the
new URL and open a new request?
if so, the new http request should be create in the primary thread or
sub-thread
3 Could experienced guys give me a hint? and a sample is greatly needed.



0 new messages