本文整理汇总了C#中ICorDebugThread.CreateEval方法的典型用法代码示例。如果您正苦于以下问题:C# ICorDebugThread.CreateEval方法的具体用法?C# ICorDebugThread.CreateEval怎么用?C# ICorDebugThread.CreateEval使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ICorDebugThread
的用法示例。
在下文中一共展示了ICorDebugThread.CreateEval方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: PrepareToCopyInjectorAssembly
private void PrepareToCopyInjectorAssembly(ICorDebugThread thread)
{
// Here we create space for new bytes array in the target process.
// When next OnDebuggerEvalCompleted occur - we'll fill this array
// with bytes of injecting assembly.
if (_byteCorType == null)
{
Logger.WriteLine("Cannot copy assembly because mscrolib module was not resolved");
return;
}
if (_assemblyCodeInTargetProcess == null)
{
ICorDebugEval ppEval;
thread.CreateEval(out ppEval);
var eval2 = (ICorDebugEval2)ppEval;
uint lowBounds = 0;
var dims = (uint)_assemblyBytes.Length;
eval2.NewParameterizedArray(_byteCorType, 1, ref dims, ref lowBounds);
}
}
示例2: CallInjector
private void CallInjector(ICorDebugThread thread)
{
ICorDebugEval ppEval;
thread.CreateEval(out ppEval);
var eval2 = (ICorDebugEval2)ppEval;
ICorDebugType[] types = new ICorDebugType[0];
ICorDebugValue[] values = new ICorDebugValue[0];
_nextEvalShouldCloseApplication = true;
eval2.CallParameterizedFunction(_injectorFunction.Interface, 0, types, (uint)values.Length, values);
}