WinInet progress bar

is there api for using a progress bar with wininet
Last edited on
Microsoft provides the ProgressBar class.
It's up to you to update it as whatever you're doing progresses.
http://msdn.microsoft.com/en-us/library/system.windows.forms.progressbar.aspx?cs-save-lang=1&cs-lang=cpp#code-snippet-1
I familiar with the progress bar..such as setting the range and stepping it, but I know ReadFile and InternetWriteFile are needed to get the blocks of data, that is what I read on the internet.


can someone verify this though
Last edited on
below /////
Last edited on
FtpPutFile is a blocking function, you can't use a progress bar with it, use InternetWriteFile instead.
http://msdn.microsoft.com/en-us/library/windows/desktop/aa385128(v=vs.85).aspx


However, if I were you, I'd use libcurl instead of WinInet:
http://curl.haxx.se/
Can someone tell me how this works. I was messing around with INTERNETWRITEFILE to upload but its not working..i just want to use internetwritefile to upload a simple text file(in FTP)..here is my code...

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
	HINTERNET remote = NULL;
	  DWORD dwBytesRead;
     DWORD dwBytesWritten;
	BYTE pBuffer[1024];
int row = m_listcontrol.GetSelectionMark();

CString s2 = m_listcontrol.GetItemText(row, 0); 

UpdateData(true);

CString piss;
piss = m_pep;
UpdateData(false);
MessageBox(piss,piss,MB_OK);

	 remote = FtpOpenFile(hIConnect,piss,GENERIC_READ,FTP_TRANSFER_TYPE_BINARY,NULL);
  InternetWriteFile(remote,pBuffer,35,&dwBytesWritten);
Last edited on
Topic archived. No new replies allowed.