|
|
|
В чем ошибка???
|
|||
|---|---|---|---|
|
#18+
Есть проект, доюавляю в него функцию-член класса с кодом: CInternetSession sess(_T("MyProgram/1.0")); CFtpConnection* pFtpConnection = NULL; CInternetSessionEx* pSession; try { // Request a connection to ftp.microsoft.com. Default // parameters mean that we'll try with username = ANONYMOUS // and password set to the machine name @ domain name // pConnect = sess.GetFtpConnection(address.c_str(), username.c_str(), password.c_str(), INTERNET_DEFAULT_FTP_PORT); address = "ftp.xtrapilot.com"; username = "usr0001"; password = "xp001"; pSession = new CInternetSessionEx(AfxGetApp()->m_pszAppName, 1, INTERNET_OPEN_TYPE_DIRECT, 0, 0, INTERNET_FLAG_DONT_CACHE); pFtpConnection = pSession->GetFtpConnection(address.c_str(), username.c_str(), password.c_str(), INTERNET_DEFAULT_FTP_PORT); // use a file find object to enumerate files CFtpFileFind finder(pFtpConnection); // start looping BOOL bWorking = finder.FindFile(_T("*")); while (bWorking) { bWorking = finder.FindNextFile(); printf("%s\n", (LPCTSTR) finder.GetFileURL()); } } catch (CInternetException* pEx) { TCHAR sz[1024]; pEx->GetErrorMessage(sz, 1024); printf("ERROR! %s\n", sz); pEx->Delete(); } // if the connection is open, close it if (pFtpConnection != NULL) pFtpConnection->Close(); delete pFtpConnection; И все виснет. В чем может проблема?????? ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 22.09.2005, 17:17 |
|
||
|
|

start [/forum/topic.php?fid=57&fpage=391&tid=2032740]: |
0ms |
get settings: |
11ms |
get forum list: |
22ms |
check forum access: |
5ms |
check topic access: |
5ms |
track hit: |
63ms |
get topic data: |
15ms |
get forum data: |
4ms |
get page messages: |
42ms |
get tp. blocked users: |
2ms |
| others: | 261ms |
| total: | 430ms |

| 0 / 0 |
