本文整理汇总了C#中ICorDebugThread.GetProcess方法的典型用法代码示例。如果您正苦于以下问题:C# ICorDebugThread.GetProcess方法的具体用法?C# ICorDebugThread.GetProcess怎么用?C# ICorDebugThread.GetProcess使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ICorDebugThread
的用法示例。
在下文中一共展示了ICorDebugThread.GetProcess方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GetProcessCallbackInterface
public ManagedCallback GetProcessCallbackInterface(string name, ICorDebugThread pThread)
{
ICorDebugProcess pProcess;
try {
pProcess = pThread.GetProcess();
} catch (COMException e) {
debugger.TraceMessage("Ignoring callback \"" + name + "\": " + e.Message);
return null;
}
return GetProcessCallbackInterface(name, pProcess);
}
示例2: TryGetValidProcess
public DnProcess TryGetValidProcess(ICorDebugThread comThread)
{
DebugVerifyThread();
if (comThread == null)
return null;
ICorDebugProcess comProcess;
int hr = comThread.GetProcess(out comProcess);
if (hr < 0)
return null;
return TryGetValidProcess(comProcess);
}
示例3: InitializeCurrentDebuggerState
void InitializeCurrentDebuggerState(DebugCallbackEventArgs e, ICorDebugProcess comProcess, ICorDebugAppDomain comAppDomain, ICorDebugThread comThread)
{
if (comThread != null) {
if (comProcess == null)
comThread.GetProcess(out comProcess);
if (comAppDomain == null)
comThread.GetAppDomain(out comAppDomain);
}
if (comAppDomain != null) {
if (comProcess == null)
comAppDomain.GetProcess(out comProcess);
}
var process = TryGetValidProcess(comProcess);
DnAppDomain appDomain;
DnThread thread;
if (process != null) {
appDomain = process.TryGetAppDomain(comAppDomain);
thread = process.TryGetThread(comThread);
}
else {
appDomain = null;
thread = null;
}
if (thread == null && appDomain == null && process != null)
appDomain = process.AppDomains.FirstOrDefault();
if (thread == null) {
if (appDomain != null)
thread = appDomain.Threads.FirstOrDefault();
else if (process != null)
thread = process.Threads.FirstOrDefault();
}
if (process == null)
SetDefaultCurrentProcess(e);
else
AddDebuggerState(new DebuggerState(e, process, appDomain, thread));
}
示例4: EnterCallback
void EnterCallback(string name, ICorDebugThread pThread)
{
EnterCallback(name, pThread.GetProcess());
}
示例5: EnterCallback
void EnterCallback(PausedReason pausedReason, string name, ICorDebugThread pThread)
{
EnterCallback(pausedReason, name, pThread.GetProcess());
process.SelectedThread = process.Threads[pThread];
}
示例6: EnterCallback
void EnterCallback(string name, ICorDebugThread pThread)
{
EnterCallback(name, pThread.GetProcess());
threadToReport = process.GetThread(pThread);
}