Exemplo n.º 1
0
        public static CorGenericValue create_Object(this MDbgEngine engine, CorElementType elementType, object value)
        {
            var corEval      = engine.corEval();
            var corClass     = engine.process().ResolveClass(value.typeFullName());
            var corValue     = corEval.CreateValue(elementType, corClass);
            var genericValue = corValue.CastToGenericValue();

            return(genericValue.value(value));
        }
Exemplo n.º 2
0
        public static CorValue create_String(this MDbgEngine engine, string stringValue)
        {
            CorEval eval = engine.corEval();

            eval.NewString(stringValue);
            engine.goAndWait();
            CorValue corValue = (engine.activeProcess().StopReason as EvalCompleteStopReason).Eval.Result;

            return(corValue);
        }
Exemplo n.º 3
0
 public static MDbgEngine invoke_Method(this MDbgEngine engine, CorFunction function, CorValue[] parameters)
 {
     try
     {
         var eval = engine.corEval();
         eval.CallFunction(function, parameters);
         engine.goAndWait();
     }
     catch (Exception ex)
     {
         "[MDbgEngine] invoke_Method: {0}".error(ex.Message);
     }
     return(engine);
 }