Article ID: 176787 - Last Review: July 1, 2004 - Revision: 2.1 How To Get WinInet Information from a URL Moniker BindingThis article was previously published under Q176787 SUMMARY
Programs that use URL Monikers to download data but need to obtain extra
low-level WinInet information about the download can use the
IWinInetHttpInfo and IWinInetInfo interfaces.
The IWinInetHttpInfo interface implemented by the binding object can be used to make the equivalent of HttpQueryInfo calls. In the same fashion, IWinInetInfo can be used to make the equivalent of InternetQueryOption calls. MORE INFORMATION
The user of a URL Moniker receives a reference to the IBinding interface of
the binding object in the IBindStatusCallback::OnStartBinding interface.
When binding to an HTTP server, the binding object supports the
IWinInetHttpInfo interface for obtaining HTTP-specific information, such as
HTTP headers. The binding object also supports the IWinInetInfo interface
for obtaining Internet options such as the name of the file downloaded by a
URL moniker binding. Both interfaces support the QueryInfo method.
QueryInfo basically forwards the call to the standard WinInet functions
HttpQueryInfo and InternetQueryOption, respectively.
Here is a sample snippet of code from an IBindStatusCallback implementation that uses IWininetHttpInfo to retrieve the raw headers sent by the HTTP server. It then uses IWininetInfo to query for the name of the local data file returned by the download: REFERENCES
Internet Client SDK: Internet Tools & Technologies; Monikers, URLs,
Security Zones, and Pluggable Protocols
Internet Client SDK: Internet Tools & Technologies; WinInet API APPLIES TO
| Article Translations
|

Back to the top
