110,533
社区成员
发帖
与我相关
我的任务
分享
Object res;
Process proc = Process.GetProcessById(pid);
IEnumUnknown runtimes = metahost.EnumerateLoadedRuntimes(proc.Handle);
ICLRRuntimeInfo runtime = GetRuntime(runtimes, desiredVersion);
runtime.GetInterface(ref CLSID_ICorDebug, ref IID_ICorDebug, out res);
((ICorDebug)res).Initialize();
((ICorDebug)res).SetManagedHandler(new ManagedCallback(options));