?
Solved

How can i use putfile fn properly?

Posted on 2000-03-15
9
Medium Priority
?
351 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
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 

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 400 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

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…
Introduction: Database storage, where is the exe actually on the disc? Playing a game selected randomly (how to generate random numbers).  Error trapping with try..catch to help the code run even if something goes wrong. Continuing from the seve…
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.
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
Suggested Courses

752 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