![]() |
|
#1
|
|||
|
|||
CFileDialog::DoModal() blocks in Release configurationHello Everybody,
I have a MFC application that uses the CFileDialog class to use an Open File window. The code I am using is the following: CPP / C++ / C Code:
When I compile in Debug configuration everything works just fine, but in Release configuration the following happens: 1º) When I run from inside the Visual C++, it works; 2º) When I run directly from the EXE file, it blocks in the DoModal() call of the CFileDialog object; 3º) If I use the old-style file dialog box, it works just fine. Does anyone know what migth be wrong? Thanks, Wagner Last edited by JdS : 20-Jul-2004 at 17:04.
Reason: Please insert [c] & [/c] tags between your example C codes
|
|
#2
|
|||
|
|||
IE 6 COM Apartment Threading Model may be the issueHi WSCHALCH,
I recently ran into excactly the same issue with the CFileDialog: At a customer site (of course, it couldn't happen in our lab) the application would freeze whenever somebody opened the File Save-As dialog. After searching the web for answers, I came across a posting which I found very helpful (it's at the end of this posting). Basically, if you have IE 6 installed and initialize the COM Apartment as multi-threaded, you may (or may not) run into troubles with the CFileDialog class (or the ::GetSaveFileName WIN32 function - it's really the same thing). Based on that information I changed the threading model to Single Threaded and the application works beautifully ever since! One thing though: There may be situations where IE 6 does not cause the above situation, i.e. my development PC, running Win2k Pro and IE 6. In difference to the customer site my OS has all SPs and Hotfixes loaded - and it's very likely that one of them fixed the IE 6 COM issue. And here's the promised link: www.codeguru.com Have fun! |
Recent GIDBlog
Toyota - 2008 August Promotion by Nihal
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| CD burner wont burn!! | robertli55 | Computer Hardware Forum | 1 | 18-Jun-2004 10:53 |
| Yet another CD burner problem: Lite-On LSC-24082K | Erwin | Computer Hardware Forum | 1 | 22-May-2004 11:28 |
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The