Search code examples
c++unmanagedmmc

Debugging MMC (Unmanaged c++)?


I work on a legacy MMC application and one thing I have noticed is that once in awhile when closing the MMC, an error will be reported.

"MMC has detected an error in a snap-in. It is recommended that you shut down and restart MMC".

How can I debug this? The error is not displayd until you close the console and if you try to attach a debugger, it just exits instantly.

Any thoughts?


Solution

  • Why not run the MMC under debugger? Clearly there is something wrong (Unhandled exception probably) with the shutdown code of the snapin.

    Just run mmc.exe under your favorite debugger and tell the debugger to stop on all exception. attach your snapin exit and wait for the crash.


    You can try to run ProcDump which can create dump files on Unhandled exception.