Solved

How can i use putfile fn properly?

Posted on 2000-03-15
9
323 Views
Last Modified: 2013-11-20
hi !

   I have used 'PutFile' fn to upload a file.But if the fn fails how will i know the exact cause of failure?I used GetLastError(),but i don't know what error the value points to.

Is there any other method?
can anyone help?

Thanks in advance
ceena.
0
Comment
Question by:ceena
9 Comments
 
LVL 2

Expert Comment

by:abdij
ID: 2622503
Hi,
What is the error code u get after GetLastError()??

Bye
Abdij
0
 
LVL 1

Expert Comment

by:mahno
ID: 2622578
U can find Error Codes description in MSDN
0
 

Author Comment

by:ceena
ID: 2622580
Thanks. it is 120131.

0
 

Author Comment

by:ceena
ID: 2622589
Thanks. it is 120131.

0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 11

Expert Comment

by:mikeblas
ID: 2625365
You're giving us the wrong error number; 120131 is not a valid Windows error number.

many errors from WinINet functions are in the range 12000 to 12500 or so.  12130 thru 12138 are errors specific to the GOPHER protocol. FTP errors area 12110 thru 12112.

12031 is ERROR_INTERNET_CONNECTION_RESET, which means the server abruptly reset the connection with your app.

Please give us the correct error number, or maybe show some code. Otherwise, we can't give you much advice.

..B ekiM
0
 

Author Comment

by:ceena
ID: 2626399
really sorry abt it. it is 12031 .thanks for the info.
0
 

Author Comment

by:ceena
ID: 2627330
Adjusted points from 50 to 100
0
 

Author Comment

by:ceena
ID: 2627331

  How can i know how much % of file has been transferred......i want to introduce a progress bar
for the file transfer....so how will i know the file transfer rate....How can i use onstatus call back fn properly.....
0
 
LVL 11

Accepted Solution

by:
mikeblas earned 100 total points
ID: 2631601
To make a progress bar, you can't use PutFile().  You'll need to open the file locally, open the file remotely, measure the size, and transfer block by block. Your progress will be given by the number of blocks trnasferred relative to the file size.

..B ekiM
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Login Script to Copy Folders 12 28
ORA-01403: no data found 43 89
windows 10 how make picture as desktop background 2 58
wordappend challenge 8 143
This is to be the first in a series of articles demonstrating the development of a complete windows based application using the MFC classes.  I’ll try to keep each article focused on one (or a couple) of the tasks that one may meet.   Introductio…
Introduction: Hints for the grid button.  Nested classes, templated collections.  Squash that darned bug! Continuing from the sixth article about sudoku.   Open the project in visual studio. First we will finish with the SUD_SETVALUE messa…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

932 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now