OVERLAPPED I/O OPERATION IS IN PROGRESS !
Richard Rafaj -- rafaj@internet.sk Tuesday, February 11, 1997 Environment: VC++ 4.2-flat; Win NT 4.0 Hi all, I'm working on app which downloads HTML files from servers to my disk (off-line browser). My code looks like this: 1. pxxxSession = new CXXXSession(IDS_XXX, PRE_CONFIG_INTERNET_ACCESS); where CXXXSession is inherited from CInternetSession base class CXXXSession::CXXXSession(LPCTSTR pszAppName, int nMethod) : CInternetSession(pszAppName, 1, nMethod, NULL, NULL, INTERNET_FLAG_ASYNC) { } 2. if (!AfxParseURL(m_URL, dwServiceType, strServerName, strObject, nPort) || dwServiceType != INTERNET_SERVICE_HTTP) { AfxMessageBox..... } and 3. pIFile = m_pxxxSession->OpenURL(m_URL, 1, 0, szHeaders, lstrlen(szHeaders)); When I start my app, following message box periodically pops up: "OVERLAPPED I/O OPERATION IS IN PROGRESS !" What does it mean? My output window looks like this: Loaded symbols for 'C:\WINNT\system32\MFC42D.DLL' Loaded symbols for 'C:\WINNT\system32\MSVCRTD.DLL' Loaded symbols for 'C:\WINNT\system32\MFCO42D.DLL' LDR: Automatic DLL Relocation in XXX.exe LDR: Dll SHLWAPI.dll base bfe50000 relocated due to collision with Dynamically Allocated Memory Warning: throwing CInternetException for error 997 First-chance exception in XXX.exe (MFC42D.DLL): 0xE06D7363: Microsoft C++ Exception. The thread 0x91 has exited with code 0 (0x0). The thread 0x2A has exited with code 0 (0x0). The thread 0xA4 has exited with code 0 (0x0). The thread 0x93 has exited with code 0 (0x0). The thread 0xAC has exited with code 0 (0x0). The program 'E:\Work\XXX\Debug\XXX.exe' has exited with code 0 (0x0). Thanx, Richard rafaj@internet.sk
Mike Blaszczak -- mikeblas@nwlink.com Wednesday, February 12, 1997 At 12:46 2/11/97 +0100, Richard Rafaj wrote: >Environment: VC++ 4.2-flat; Win NT 4.0 Please upgrade to MFC 4.2b. MFC 4.2-flat works only against beta versions of some components of the operating system and is broken aginst >My code looks like this: [...] >INTERNET_FLAG_ASYNC) INTERNET_FLAG_ASYNC isn't supported by MFC. >3. pIFile = m_pxxxSession->OpenURL(m_URL, 1, 0, szHeaders, >lstrlen(szHeaders)); > >When I start my app, following message box periodically pops up: >"OVERLAPPED I/O OPERATION IS IN PROGRESS !" >What does it mean? It means two things: 1) You wouldn't benefit from asynchronous access, anyway. Since you're creating the connection and then immediately using it, you'll block whether you use asynchronous access or not. 2) You've written code that's very poor. You're not handling any exceptions that could be generated by MFC, and have wound up relying on MFC's backstop exception handler, which does what it can: it shows an error message based on the exception thrown in a message box. I've answered this same question several times on the list. You might want to pick through the archives if you'd like to find more details about the matter. .B ekiM http://www.nwlink.com/~mikeblas/ These words are my own. I do not speak on behalf of Microsoft. This performance was not lip-synched.
Become an MFC-L member | Вернуться в корень Архива |