Re: URLDownloadToFile with custom HTTP Headers??

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



On Dec 22, 9:16 am, Dave Brown <key8...@xxxxxxxxx> wrote:
On Dec 22, 4:48 am, "Igor Tandetnik" <itandet...@xxxxxxxx> wrote:





"Dave Brown" <key8...@xxxxxxxxx> wrote in message

news:970bd17d-8e7e-4fa2-9844-db639eecc65a@xxxxxxxxxxxxxxxxxxxxxxxxxxxx

Is it possible to set some HTTP headers which are sent from
URLDownloadToFile?

Write a COM object implementing IBindStatusCallback, IServiceProvider
and IHttpNegotiate. Have IServiceProvider::QueryService return
IHttpNegotiate when queried for it. Pass IBindStatusCallback off this
object as the last parameter to URLDownloadToFile. Provide your headers
in IHttpNegotiate::BeginningTransaction.
--
With best wishes,
    Igor Tandetnik

With sufficient thrust, pigs fly just fine. However, this is not
necessarily a good idea. It is hard to be sure where they are going to
land, and it could be dangerous sitting under them as they fly
overhead. -- RFC 1925

Thanks Igor! Will try this now.- Hide quoted text -

- Show quoted text -

This works great. Note that IServiceProvider is not needed in this
case ( see
http://groups.google.com/group/microsoft.public.inetsdk.programming.webbrowser_ctl/browse_thread/thread/138a97474682e51a/a4e2049d40c5a677
).
.



Relevant Pages

  • Re: URLDownloadToFile with custom HTTP Headers??
    ... Write a COM object implementing IBindStatusCallback, ... IHttpNegotiate when queried for it. ... object as the last parameter to URLDownloadToFile. ...     Igor Tandetnik ...
    (microsoft.public.inetsdk.programming.webbrowser_ctl)
  • Re: URLDownloadToFile with custom HTTP Headers??
    ... Write a COM object implementing IBindStatusCallback, IServiceProvider ... IHttpNegotiate when queried for it. ... object as the last parameter to URLDownloadToFile. ...
    (microsoft.public.inetsdk.programming.webbrowser_ctl)
  • Re: URLDownloadToFile Error
    ... I've seen reports that URLDownloadToFile does not work with HTTP ... compression. ... Igor Tandetnik ... With sufficient thrust, pigs fly just fine. ...
    (microsoft.public.inetsdk.programming.webbrowser_ctl)