开发者

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

Whenever I run my ap开发者_如何学Pythonplication 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.


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.


Just to add to Alex's answer above, the exception can be ignored. To do this under VS2010, do the following;

  • Debug / Exceptions
  • Add, type is Win32 exception, number 0x6ba
  • Go to Win32 exceptions, and untick thrown under 6ba

This allows you to keep other exceptions active during debugging

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜