Click here to Skip to main content
15,886,199 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
How to include URLDownloadToFile in QT??? How to include the header file for It??
Posted

Found in a Qt example for a browser plugin[^]:

#include <qt_windows.h>
 
Share this answer
 
The function you're after is in urlmon.h.
You could try it like this:

C
#include <tchar.h>
#include <urlmon.h>
#include <Wininet.h>
#pragma comment(lib, "urlmon.lib")
#pragma comment(lib,"wininet.lib")

int main()
{
    HRESULT hr;
    LPCTSTR Url = _T("http://url.."), File = _T("etc...");
    hr = URLDownloadToFile (0, Url, File, 0, 0);
    return 0;
}


The example above was grabbed from this web site: http://www.dreamincode.net/forums/topic/189846-progress-bar-urldownloadtofile/[^]


Regards,
 
Share this answer
 
v2
Comments
Gokulnath007 7-Mar-11 7:23am    
No.. there is no urlmon.h header in QT..
Manfred Rudolf Bihy 7-Mar-11 8:19am    
You'll just have to see if that library is available for your device. Besides that you explicitely asked for the function URLDownloadToFile and my answer is absolutely correct that it is in urlmon.h.

You have to learn how to make better specifications in your questions. Why not use the QT libraries that are available to you. There are plenty of examples on this site: http://doc.qt.nokia.com/4.7/network-download-main-cpp.html
sariqkhan 31-Dec-12 8:14am    
+5

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900