Hi i got a problem with following Function:
The File gets downloaded, but its too big. When i compare original to downloaded file hexwise, i can see that some bytes are twice there in the downloaded file, and as far as i can judge, all the original stuff is there.Code:void GetFiles() { FILE* pFile; DWORD ReadFiles,dwSize; char buf[1025]; HINTERNET hInternet, hFile; hInternet = InternetOpen("sCC Patcher", INTERNET_OPEN_TYPE_DIRECT, NULL, NULL, 0); hFile = InternetOpenUrl( hInternet, "someurl", NULL, 0, INTERNET_FLAG_RELOAD, INTERNET_NO_CALLBACK ); pFile = fopen("l2.exe", "w+"); InternetReadFile(hFile, buf, 1024, &ReadFiles); while(ReadFiles != 0) { fwrite ( buf, ReadFiles, 1, pFile ); InternetReadFile(hFile, buf, 1024, &ReadFiles); } fwrite ( buf, ReadFiles, 1, pFile ); fclose(pFile); }
If it help i can upload original and downloaded file.
Thx



LinkBack URL
About LinkBacks


