Group: URL Monikers - Library: urlmon
How to download a file from HTTP server using URL Monikers functions
The DetectAutoProxyUrl function identifies the auto-config script location
HRESULT URLDownloadToFile(
LPUNKNOWN pCaller,
LPCTSTR szURL,
LPCTSTR szFileName,
DWORD dwReserved,
LPBINDSTATUSCALLBACK lpfnCB
);
DECLARE INTEGER URLDownloadToFile IN urlmon.dll;
INTEGER pCaller,;
STRING szURL,;
STRING szFileName,;
INTEGER dwReserved,;
INTEGER lpfnCB
pCaller Pointer to the controlling IUnknown interface of the calling Microsoft® ActiveX® component (if the caller is an ActiveX component). If the calling application is not an ActiveX component, this value can be set to NULL.
szURL Pointer to a string value containing the URL to be downloaded. Cannot be set to NULL.
szFileName Pointer to a string value containing the name of the file to create for bits that come from the download.
dwReserved Reserved. Must be set to 0.
lpfnCB Pointer to the caller"s IBindStatusCallback interface.
Returns one of the following values: E_OUTOFMEMORY, S_OK