 |
|
|
 |
|
|
The latest version on my web site at www.naughter.com implements the GUI part of the code in a separate class meaning that if you do not want any UI then you can use the code in that fashion
|
| Sign In·View Thread·PermaLink | 3.00/5 (1 vote) |
|
|
|
 |
|
|
HI...i need help!!!
I have to do a project in c/c++ to implement a protocol which can be any protocol depends on us..can anyone guide me how to do that...plzzz
vivek
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
help , when building the project ,this error appeared : fatal error LNK1104: cannot open file "mfc42u.lib" , i don't know what to do?
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
After checking google I saw that there are two solutions to fix this.
One way is to install the unicode lib for VS6 or go to active config. under the build menu and select win32 release or debug, not the unicode version.
Hope this helps.
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
Can someone please tell me if this class handles the uploading of images? I've been using it and it has worked great until now. I needed to upload a gif and the file becomes unreadable. I tried it in both binary and ascii modes. Any ideas?
Jack
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
I'm using this class to upload gif images and uploaded images are ok. Did you set m_bBinary = true?
Tomas Jakl
|
| Sign In·View Thread·PermaLink | 3.00/5 (2 votes) |
|
|
|
 |
|
|
When I write a text file to my hard disk, the lines are separated by \n and it displays as one would expect. But when I upload this file to my host, the text is displayed in one long line. It I add \r\n instead of just \n at the end of each line, the effect is reversed - my hard disk file is one long line and the remote file is displayed on separate lines. I've tried using both binary and ascii upload modes. This probably is not a problem with this project but since it only shows up when using it I thought it would be worth asking. Is there a way to have one file work for both situations? Currently I'm creating two files with the only difference being the \r in one of them.
Jack
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
First, thanks. Your work is great. Your code is clear and easy to read. And it works fine.
Second, imagine a situation when you need to upload a dozen of files. You create an instance of the dialog for each file and perform the upload. This means that FTP session is opened and closed for every file. This may not be considered an optimal solution. Could you please introduce multiple file upload feature in your class? For example, through the use of CStringArray to pass file pathnames.
|
| Sign In·View Thread·PermaLink | 1.00/5 (1 vote) |
|
|
|
 |
|
|
 |
|
|
You can avoid having to reconnect to the FTP server multiple times by creating the connection yourself and then calling CFTPTransferDlg::AttachToExisitingHandles before the dialog is show. This means that the dialog will not need to setup the connection itself. Then just implement this logic in a for loop to download whatever files you want.
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
I appreciate this class being written, not having much knowledge on the subject myself. But the lack of handling multiple files is a shortcoming. I've tried doing as pj mentions but can't get it to work. Can someone please give me some advice on how to create the connection as mentioned in his reply.
Jack
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
For anyone that might be interested in a workable solution, here's what I ended up doing. I created a map of structs holding all of the information for the files I want to upload. Then I just loop the upload code as shown. It works fine except that the upload dialog has to open and close for each file. But it is at least done in one connection.
for (itr = mapCfgs.begin(); itr != mapCfgs.end(); ++itr) { dlg.m_sServer = itr->second.GetFTPAddress(); dlg.m_sRemoteFile = itr->second.GetRemoteFile(); dlg.m_sLocalFile = itr->second.GetUploadFile(); dlg.m_sPassword = itr->second.GetPassWord(); dlg.m_sUserName = itr->second.GetUserName(); dlg.m_bDownload = FALSE; dlg.m_bBinary = TRUE;
if (dlg.DoModal() == IDCANCEL) { return false; } }
Jack
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
If the dialog is hidden and the values (password etc..) are hard-coded. Am I right in assuming that these could be exposed?
I guess I could scramble them with hex?
I'm trying to make an auto-update program. Is there a better way?
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
Couple of things:
1) What dialog are you talking about. In the sample app I provide a dialog for filling in the values for testing purpoes but in a real program you would not require this.
2) If you are hardcoding these values into your program, then the same issues apply to these values as they would to any other type of password / secure information which you want to embed into your code.
This is an age old problem and there are a number of articles on codeproject on this. You can go from something like modulo arithmetic to simple XOR masks to more complicated but secure private key encryption mechanisms, but the problem will remain of having a password variable lying around in your address space for some time. You can get quite advanced on this by putting in anti debugging envelopes into your program (as used by dongle protection software) but in the end this will just mean that it will take a hacker 10 hours instead of 5 hours to crack. I will produce an update to the class sometime soon to ensure that the username and password are only kept in memory for as short as possible.
Regards,
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
 |
|
|
Hi My application needs file transfer service from client-to-server and vice-versa. I have written an FTP client program to do this,but the commands OpenFile and GetFile are not working. When i retrieve GetLastError after GetFile function its generating error code 12003,ERROR_SXS_ASSEMBLY_NOTSUPPORTED. MSDN says its due to some side by side assembly components, COMCTL32.COM, VCNTL.COM and DLLPLUS.COM. If I replace these dlls with the new one will FTP work, kindly answer.
Regards Girish
|
| Sign In·View Thread·PermaLink | 1.00/5 (1 vote) |
|
|
|
 |
|
|
Hi, Hope this downloading is very slow when i compared with one file by using default downloading.So,can you suggest the way or method how to improve to download fast than ordinary downloading or equilant time it should take. But it should not take more time than ordinary downloading. But this is a good logic. Thanking you.
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
I've tried the code on a number of different machines and the speed seems fine. What I would suggest you do is make sure you have the latest version from my web site (www.naughter.com).
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
 |
|
|
 |
|
|
 |
|
|
You need to use the wininet "FTPCommand" API. You will need to have an up to date version of wininet for this.
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
 |
|
|
 |