#include <iostream>
#include <conio.h>
#include <urlmon.h>
#include <string>
#pragma comment(lib, "urlmon.lib")
using namespace std;
int main()
{
string link = "http://rammichael.com/wp-content/uploads/downloads/2010/06/Icy_Tower_Trainer.rar";
string save = "C:/folder/Icy_Tower_Trainer.rar";
if( URLDownloadToFileA( NULL, link.c_str(), save.c_str(), 0, NULL ) == S_OK )
{
cout << link << " koniec. " << '\n';
}
else
{
cout << link << " blad. " << '\n';
}
getch();
}
Dobrze ?(czlowiek musi sie uczyc na bledach)
Ale i tak wywala blad :D i w dodatku w Visual C++ :
'asf.exe': Loaded 'C:\Documents and Settings\McDonald\Moje dokumenty\Visual Studio 2010\Projects\asf\Debug\asf.exe', Symbols loaded.
'asf.exe': Loaded 'C:\WINDOWS\system32\ntdll.dll', Cannot find or open the PDB file
'asf.exe': Loaded 'C:\WINDOWS\system32\kernel32.dll', Cannot find or open the PDB file
'asf.exe': Loaded 'C:\WINDOWS\system32\msvcp100d.dll', Symbols loaded.
'asf.exe': Loaded 'C:\WINDOWS\system32\msvcr100d.dll', Symbols loaded.
'asf.exe': Loaded 'C:\WINDOWS\system32\urlmon.dll', Cannot find or open the PDB file
'asf.exe': Loaded 'C:\WINDOWS\system32\advapi32.dll', Cannot find or open the PDB file
'asf.exe': Loaded 'C:\WINDOWS\system32\rpcrt4.dll', Cannot find or open the PDB file
'asf.exe': Loaded 'C:\WINDOWS\system32\secur32.dll', Cannot find or open the PDB file
'asf.exe': Loaded 'C:\WINDOWS\system32\gdi32.dll', Cannot find or open the PDB file
'asf.exe': Loaded 'C:\WINDOWS\system32\user32.dll', Cannot find or open the PDB file
'asf.exe': Loaded 'C:\WINDOWS\system32\ole32.dll', Cannot find or open the PDB file
'asf.exe': Loaded 'C:\WINDOWS\system32\msvcrt.dll', Cannot find or open the PDB file
'asf.exe': Loaded 'C:\WINDOWS\system32\shlwapi.dll', Cannot find or open the PDB file
'asf.exe': Loaded 'C:\WINDOWS\system32\version.dll', Cannot find or open the PDB file
'asf.exe': Loaded 'C:\WINDOWS\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.2600.6028_x-ww_61e65202\comctl32.dll', Cannot find or open the PDB file
'asf.exe': Loaded 'C:\WINDOWS\system32\uxtheme.dll', Cannot find or open the PDB file
'asf.exe': Loaded 'C:\Program Files\Unlocker\UnlockerHook.dll', Binary was not built with debug information.
'asf.exe': Loaded 'C:\WINDOWS\system32\shell32.dll', Cannot find or open the PDB file
'asf.exe': Loaded 'C:\WINDOWS\system32\comctl32.dll', Cannot find or open the PDB file
'asf.exe': Loaded 'C:\WINDOWS\system32\MSCTF.dll', Cannot find or open the PDB file
'asf.exe': Loaded 'C:\WINDOWS\system32\mlang.dll', Cannot find or open the PDB file
'asf.exe': Loaded 'C:\WINDOWS\system32\wininet.dll', Cannot find or open the PDB file
'asf.exe': Loaded 'C:\WINDOWS\system32\crypt32.dll', Cannot find or open the PDB file
'asf.exe': Loaded 'C:\WINDOWS\system32\msasn1.dll', Cannot find or open the PDB file
'asf.exe': Loaded 'C:\WINDOWS\system32\oleaut32.dll', Cannot find or open the PDB file
'asf.exe': Loaded 'C:\WINDOWS\system32\wsock32.dll', Cannot find or open the PDB file
'asf.exe': Loaded 'C:\WINDOWS\system32\ws2_32.dll', Cannot find or open the PDB file
'asf.exe': Loaded 'C:\WINDOWS\system32\ws2help.dll', Cannot find or open the PDB file
'asf.exe': Loaded 'C:\WINDOWS\system32\mswsock.dll', Cannot find or open the PDB file
'asf.exe': Loaded 'C:\WINDOWS\system32\hnetcfg.dll', Cannot find or open the PDB file
'asf.exe': Loaded 'C:\WINDOWS\system32\rasapi32.dll', Cannot find or open the PDB file
'asf.exe': Loaded 'C:\WINDOWS\system32\rasman.dll', Cannot find or open the PDB file
'asf.exe': Loaded 'C:\WINDOWS\system32\netapi32.dll', Cannot find or open the PDB file
'asf.exe': Loaded 'C:\WINDOWS\system32\tapi32.dll', Cannot find or open the PDB file
'asf.exe': Loaded 'C:\WINDOWS\system32\rtutils.dll', Cannot find or open the PDB file
'asf.exe': Loaded 'C:\WINDOWS\system32\winmm.dll', Cannot find or open the PDB file
'asf.exe': Loaded 'C:\WINDOWS\system32\wshtcpip.dll', Cannot find or open the PDB file
'asf.exe': Loaded 'C:\WINDOWS\system32\sensapi.dll', Cannot find or open the PDB file
'asf.exe': Loaded 'C:\WINDOWS\system32\userenv.dll', Cannot find or open the PDB file
'asf.exe': Loaded 'C:\WINDOWS\system32\dnsapi.dll', Cannot find or open the PDB file
'asf.exe': Loaded 'C:\WINDOWS\system32\iphlpapi.dll', Cannot find or open the PDB file
'asf.exe': Loaded 'C:\WINDOWS\system32\winrnr.dll', Cannot find or open the PDB file
'asf.exe': Loaded 'C:\WINDOWS\system32\wldap32.dll', Cannot find or open the PDB file
'asf.exe': Loaded 'C:\WINDOWS\system32\wshbth.dll', Cannot find or open the PDB file
'asf.exe': Loaded 'C:\WINDOWS\system32\setupapi.dll', Cannot find or open the PDB file
'asf.exe': Loaded 'C:\WINDOWS\system32\rasadhlp.dll', Cannot find or open the PDB file
The thread 'Win32 Thread' (0x6f4) has exited with code 0 (0x0).
The thread 'Win32 Thread' (0x890) has exited with code 0 (0x0).
The thread 'Win32 Thread' (0x59c) has exited with code 0 (0x0).
The thread 'Win32 Thread' (0x198) has exited with code 0 (0x0).
nagle te pliki nie sa wcyztywane wiec wszedlem w te katalogi patrze a tu te pliki sa ;/