HRESULT URLDownloadToFile( LPUNKNOWN pCaller, // Caller's controlling IUnknown LPCWSTR szURL, // Pointer to URL to be downloaded LPCTSTR szFileName, // Pointer to file name DWORD dwResv, // Reserved for future use LPBINDSTATUSCALLBACK lpfnCB // Caller's IBindStatusCallback );
Parameters pCaller [in] Pointer to the caller's controlling IUnknown. If the caller is not an ActiveX component, this value may be set to NULL. szURL [out] Pointer to the URL to be downloaded. Cannot be NULL. szFileName [out] Pointer to the name of the file returned by this function. The user should pass a buffer to be filled and, preferably, use MAX_PATH to allocate the maximum path size. dwResv [in] Reserved for future use; must be zero. lpfnCB [in] Pointer to the caller's IBindStatusCallback interface. Can be NULL. msdn上面说可以使用lpfnCB来监测进度等信息,如果不让它为NULL,该如何使用呢?谢谢大侠。
http://www.cnitblog.com/wangk/archive/2005/12/31/5942.html
or make another http request
{
if (::URLDownloadToFile(NULL, strSourecUrl, strLocalDest, 0, NULL ) != S_OK )
{
return FALSE;
} return TRUE;
}
LPUNKNOWN pCaller, // Caller's controlling IUnknown
LPCWSTR szURL, // Pointer to URL to be downloaded
LPCTSTR szFileName, // Pointer to file name
DWORD dwResv, // Reserved for future use
LPBINDSTATUSCALLBACK lpfnCB
// Caller's IBindStatusCallback
);
Parameters
pCaller
[in] Pointer to the caller's controlling IUnknown. If the caller is not an ActiveX component, this value may be set to NULL.
szURL
[out] Pointer to the URL to be downloaded. Cannot be NULL.
szFileName
[out] Pointer to the name of the file returned by this function. The user should pass a buffer to be filled and, preferably, use MAX_PATH to allocate the maximum path size.
dwResv
[in] Reserved for future use; must be zero.
lpfnCB
[in] Pointer to the caller's IBindStatusCallback interface. Can be NULL.
msdn上面说可以使用lpfnCB来监测进度等信息,如果不让它为NULL,该如何使用呢?谢谢大侠。