Solved

How can i use putfile fn properly?

Posted on 2000-03-15
9
318 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
Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

 
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

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Introduction: The undo support, implementing a stack. Continuing from the eigth article about sudoku.   We need a mechanism to keep track of the digits entered so as to implement an undo mechanism.  This should be a ‘Last In First Out’ collec…
If you use Adobe Reader X it is possible you can't open OLE PDF documents in the standard. The reason is the 'save box mode' in adobe reader X. Many people think the protected Mode of adobe reader x is only to stop the write access. But this fe…
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.
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…

706 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

18 Experts available now in Live!

Get 1:1 Help Now