none
Debugging MMC SnapIn in VS 2015 RRS feed

  • Question

  • I need to debug a snapin dll source code written in C++ in VS2015.

    I am new to this MMC and snapin development. Please anyone guide me with steps or any available tutorial to how to debug line by line code of my snapin dll.

    Thanks in advance.


    Thanks & Regards, Mayank Agarwal

    Wednesday, May 15, 2019 9:30 AM

All replies

  • Wednesday, May 15, 2019 9:34 AM
  • Hello,

    this should help you debugging a dll code in your project: https://stackoverflow.com/questions/16546703/visual-studio-debugging-a-referenced-dll-i-have-source-in-another-sln

    Regards, Guido

    Wednesday, May 15, 2019 9:34 AM
  • Maybe you can see :  MMC Advanced Topics (How-To Test a Snap-in)

    I referred this link but here it says"Under the ‘Debug’ settings in the project properties, select the ‘Start external program’ radio button and enter the full path to mmc.exe. When the snap-in runs, you will be able to debug it." I couldnt find this feature(radio button) in my Visual Studio 2015. and after compiling the snapin, do I need to register my snapin with regsvr32 command before debugging?

    kindly suggest.


    Thanks & Regards, Mayank Agarwal

    Wednesday, May 15, 2019 10:01 AM
  • Maybe you can see :  MMC Advanced Topics (How-To Test a Snap-in)

    I referred this link but here it says"Under the ‘Debug’ settings in the project properties, select the ‘Start external program’ radio button and enter the full path to mmc.exe. When the snap-in runs, you will be able to debug it." I couldnt find this feature(radio button) in my Visual Studio 2015. and after compiling the snapin, do I need to register my snapin with regsvr32 command before debugging?

    kindly suggest.

    That's probably referring to an old version of VS.

    In VS2015 you can tell the debugger to run an external program (i.e., mmc.exe) by specifying it as the command in the dll project's property page in the following location  -

    And VS2015 will attempt to register a COM dll in HKLM during the build process if the following linker option is set (requires that VS is running as Administrator) -

    Wednesday, May 15, 2019 10:36 AM
  • Thanks RLWA32, your solution partially worked for me.

    But I do not find my SnapIn in the Add/Remove SnapIns list. I think it only displays those SnapIns whose vendor is "Microsoft cooperation", is there any way to get the name of my snapIn in that same list so that I  can debug it? And even I dont know whether my snapIn is registered or not until I do not see in that list. And until I do not add my snapIn in the MMC console I wont be able to debug it.

    Kindly Suggest.

    Thanks in Advance. 


    Thanks & Regards, Mayank Agarwal

    Wednesday, May 15, 2019 11:55 AM
  • Since you are talking about a C++ COM dll I assume that your project is an MMC 2.0 Snap-in.

    So when your COM dll is registered  it should create registry entries such as -

    MMC 2.0 Registry Entries

    Wednesday, May 15, 2019 12:22 PM
  • Hi,

    Thank you for posting here.

    >>But I do not find my SnapIn in the Add/Remove SnapIns list. I think it only displays those SnapIns whose vendor is "Microsoft cooperation", is there any way to get the name of my snapIn in that same list so that I  can debug it?

    I suggest you could try to use installutil.exe to register the snap-in. That will get it showing up in the Add/Remove Snap-ins dialog.

    Best Regards,

    Jeanine Zhang
    Thursday, May 16, 2019 2:14 AM
    Moderator
  • Hi,

    Have you got any updates? If your case has been solved, please help to mark answers. If not, just feel free to contact us.

    Your understanding and cooperation will be grateful.

    Best Regards,

    Jeanine Zhang

    Tuesday, May 28, 2019 7:56 AM
    Moderator