Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why am I getting an exception whenever I use the CFileDialog?

Tags:

c++

exception

mfc

Whenever I run my application under the debugger, I get the following exception when using CFileDialog to browse for a file to open

First-chance exception at 0x769db9bc in MyApp.exe: 0x000006BA: The RPC server is unavailable.
First-chance exception at 0x74e8cd99 in MyApp.exe: 0xC0020043: An internal error occurred in RPC.
MyApp.exe has triggered a breakpoint

This happens using VS2008 on Windows 7 64 bit, it doesn't happen doing the same thing under XP. There are no useful symbols on the call stack indicating why this is happening, and I can avoid the problem simply by turning off exceptions in the debugger, but I'm wondering why this is happening and how to avoid it.

like image 239
SmacL Avatar asked Dec 02 '22 01:12

SmacL


1 Answers

First-chance exception messages can be safely ignored. In this case, this is part of Windows API internal implementation. Exceptions are thrown and caught somewhere. You need to turn off only first chance exception break in the debugger.

like image 110
Alex F Avatar answered Dec 21 '22 10:12

Alex F