-1

In "MDbg Sample.zip" projects, invoke the function from COM Module as: [ComImport, Guid("3D6F5F61-7538-11D3-8D5B-00104B35E7EF"), InterfaceType((short) 1)] public interface ICorDebug { ... } The question is where to find the Guid("3D6F5F61-7538-11D3-8D5B-00104B35E7EF"), i can not find it in the regedit, but how to connect the ICoreDebug interface with the COM module?

Sya_inn
  • 1
  • 1

1 Answers1

1

It's not in the registry. That guid is the IID, ICorDebug doesn't support remote access so there is no reason to register a stub/proxy against the interface.

How you get an instance depends on what versions of the runtime are installed, but these days "everyone" has CLRv4 installed, so you access via the ICLRMetaHost.

Brian Reichle
  • 2,798
  • 2
  • 30
  • 34
  • Hello @Brian Reichle, I have programed according to your prompts: hr = pRuntimeInfo->GetInterface(CLSID_CLRRuntimeHost, IID_PPV_ARGS(&pRuntimeHost)); hr = pRuntimeInfo->GetInterface(CLSID_CLRRuntimeHost, IID_ICLRRuntimeHost, (LPVOID*)&pRuntimeHost); But when I debug the code ,there is notification as:There is no type information available in the symbol file for . Do you know how to solve this problem? Thanks a lot. – Sya_inn Dec 04 '16 at 02:20
  • I'm not really sure what you mean, but `CLSID_CLRRuntimeHost` looks out of place. (ICLRRuntimeHost is what you use to host a runtime in your process, it's not normally used to create an ICorDebug) – Brian Reichle Dec 05 '16 at 07:37
  • Thank you. Actually what I really want to do is to find a way to read out the detail information such as Guid etc from CLR. If I use new version CLR, I hope I can invoke such as Icoredug by myself. – Sya_inn Dec 05 '16 at 07:49