|
-
April 19th, 1999, 09:49 AM
#1
Async FTP exception
Environment:
VC++ 5.0 Win95/NT 4.0
I am having difficulty setting up an Asynchronous FTP session in order to
ftp multiple files while providing a progress status through a dialog box.
I have set up the code according to the MFC documentation including creating
a call back function but 'GetFtpConnection' throws an exception: "Overlapped
IO operation in progress".
Can some one tell me what is wrong here? The code snippet follows..
void CFTPExport::OpenFTPSession()
{
m_pInetSession = new CInternetSession( NULL, 1, INTERNET_OPEN_TYPE_DIRECT,
NULL, NULL, INTERNET_FLAG_ASYNC);
try
{
success = m_pInetSession->EnableStatusCallback();
}
catch (CInternetException* pEx)
{...}
try
{
m_pFTPConnection=
_pInetSession->GetFtpConnection( (LPCTSTR)m_ftpHost_address,
(LPCTSTR)m_ftpHost_username, (LPCTSTR)m_ftpHost_password, m_export_port,
FALSE );
}
catch (CInternetException* pEx)
Gets the Exception "Overlapped IO operation in progress".
}
void CInternetSession::OnStatusCallback( DWORD dwContext, DWORD
dwInternetStatus, LPVOID lpvStatusInformation, DWORD
dwStatusInformationLength)
{...}
Steve White
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|