Click here to Skip to main content
15,912,897 members
Home / Discussions / Managed C++/CLI
   

Managed C++/CLI

 
GeneralMessage Removed Pin
12-Sep-07 15:23
Armond Sarkisian12-Sep-07 15:23 
GeneralRe: C++ FTP Functions Pin
Mark Salsbery12-Sep-07 16:46
Mark Salsbery12-Sep-07 16:46 
GeneralMessage Removed Pin
13-Sep-07 7:57
Armond Sarkisian13-Sep-07 7:57 
GeneralRe: C++ FTP Functions Pin
Mark Salsbery13-Sep-07 8:12
Mark Salsbery13-Sep-07 8:12 
GeneralMessage Removed Pin
13-Sep-07 8:18
Armond Sarkisian13-Sep-07 8:18 
GeneralRe: C++ FTP Functions Pin
Mark Salsbery13-Sep-07 8:32
Mark Salsbery13-Sep-07 8:32 
GeneralMessage Removed Pin
13-Sep-07 8:39
Armond Sarkisian13-Sep-07 8:39 
GeneralRe: C++ FTP Functions Pin
Mark Salsbery13-Sep-07 8:52
Mark Salsbery13-Sep-07 8:52 
32 ERROR_SHARING_VIOLATION
The process cannot access the file because it is being used by another process.

12003 ERROR_INTERNET_EXTENDED_ERROR
An extended error was returned from the server. This is typically a string or buffer containing a verbose error message. Call InternetGetLastResponseInfo to retrieve the error text.

Are you still passing NULL as the second parameter to FtpFindFirstFile?
I thought you wanted just the zip files(?).


Also you should only call GetLastError() if a function fails (e.g. FtpGetFile() returns FALSE).
Not all functions that succeed reset the last error to 0 so calling GetLastError() when there
was no error can return an error code from some other call unrelated!!
Example:
Your calls should look something like

if (!::FtpGetFile(...))
{
   errcode = ::GetLastError();

   ... handle error
}


NOT

// BAD!
BOOL result = ::FtpGetFile(...);
errcode = ::GetLastError(); //<-- errcode only valid here if result is FALSE.  No need to call unless result is FALSE!
...

Mark



Mark Salsbery
Microsoft MVP - Visual C++

Java | [Coffee]

Question[Message Deleted] Pin
Herboren11-Sep-07 14:16
Herboren11-Sep-07 14:16 
AnswerRe: Understanding pointers Pin
George L. Jackson11-Sep-07 17:52
George L. Jackson11-Sep-07 17:52 
AnswerRe: Understanding pointers Pin
Hamid_RT12-Sep-07 23:07
Hamid_RT12-Sep-07 23:07 
AnswerRe: [Message Deleted] Pin
Russell'13-Sep-07 22:19
Russell'13-Sep-07 22:19 
GeneralRe: [Message Deleted] Pin
George L. Jackson14-Sep-07 11:36
George L. Jackson14-Sep-07 11:36 
GeneralRe: [Message Deleted] Pin
Russell'14-Sep-07 22:29
Russell'14-Sep-07 22:29 
Questionsetup project Pin
Franken10-Sep-07 9:15
Franken10-Sep-07 9:15 
QuestionHelp me about " template" Pin
ubriela10-Sep-07 5:26
ubriela10-Sep-07 5:26 
AnswerRe: Help me about " template" Pin
Mark Salsbery10-Sep-07 5:46
Mark Salsbery10-Sep-07 5:46 
QuestionRe: Help me about " template" Pin
Hamid_RT12-Sep-07 23:10
Hamid_RT12-Sep-07 23:10 
Questionusb otg??? Pin
kutalinelucas10-Sep-07 1:24
kutalinelucas10-Sep-07 1:24 
AnswerRe: usb otg??? Pin
Mark Salsbery10-Sep-07 5:49
Mark Salsbery10-Sep-07 5:49 
Questionredefinition error (Library) Pin
palanirajan10-Sep-07 0:03
palanirajan10-Sep-07 0:03 
AnswerRe: redefinition error (Library) Pin
Mark Salsbery10-Sep-07 5:51
Mark Salsbery10-Sep-07 5:51 
QuestionHelp with accessing COM component. Pin
art_ami9-Sep-07 19:28
art_ami9-Sep-07 19:28 
QuestionHelp with C program [modified] Pin
eitwoman8-Sep-07 13:21
eitwoman8-Sep-07 13:21 
AnswerRe: Help with C program Pin
Mark Salsbery9-Sep-07 7:54
Mark Salsbery9-Sep-07 7:54 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.