Why do I get an exception when I use CFileDialog?

Whenever I run my application under the debugger, I get the following exception when using CFileDialog to find the 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 the 64-bit version of Windows 7, but this does not happen on XP. There are no useful characters in the call stack to indicate why this is happening, and I can avoid the problem by simply turning off the exceptions in the debugger, but I wonder why this is happening and how to avoid it.

+4
source share
2 answers

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

+13
source

To add the answer above to Alex, the exception can be ignored. To do this, in VS2010, follow these steps:

  • Debugging / Exceptions
  • Add, enter Win32 exception, number 0x6ba
  • Go to Win32 exceptions and release under 6ba

This allows you to save other exceptions during debugging.

+6
source

All Articles