Solved

How can i use putfile fn properly?

Posted on 2000-03-15
9
344 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

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

0
 
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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Introduction: Displaying information on the statusbar.   Continuing from the third article about sudoku.   Open the project in visual studio. Status bar – let’s display the timestamp there.  We need to get the timestamp from the document s…
Introduction: Ownerdraw of the grid button.  A singleton class implentation and usage. Continuing from the fifth article about sudoku.   Open the project in visual studio. Go to the class view – CGridButton should be visible as a class.  R…
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.
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

717 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