Example #1
0
 public static MDbgEngine stop_Process(this MDbgEngine engine)
 {
     if (engine.activeProcess().notNull())
     {
         "[MDbgEngine] in stop_Process".info();
         engine.@break();
         engine.activeProcess().Kill();
     }
     return(engine);
 }
Example #2
0
        public static MDbgEngine invoke_Method(this MDbgEngine engine, string moduleName, string typeName, string methodName, CorValue[] parameters)
        {
            var module   = engine.module(moduleName);
            var function = engine.activeProcess().ResolveFunctionName(module, typeName, methodName);

            return(engine.invoke_Method(function.CorFunction, parameters));
        }
Example #3
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);
        }
Example #4
0
        public static List <MDbgModule> modules(this MDbgEngine engine)
        {
            var modules = new List <MDbgModule>();

            foreach (MDbgModule module in engine.activeProcess().Modules)
            {
                modules.Add(module);
            }
            return(modules);
        }
Example #5
0
        public static List <MDbgThread> threads(this MDbgEngine engine)
        {
            var threads = new List <MDbgThread>();

            foreach (MDbgThread thread in engine.activeProcess().Threads)
            {
                threads.add(thread);
            }
            return(threads);
        }
Example #6
0
 public static MDbgEngine goAndWait(this MDbgEngine engine)
 {
     engine.activeProcess().goAndWait();
     return(engine);
 }
Example #7
0
 public static MDbgProcess process(this MDbgEngine engine)
 {
     return(engine.activeProcess());
 }
Example #8
0
 public static bool hasActiveProcess(this MDbgEngine engine)
 {
     return(engine.activeProcess().notNull());
 }
Example #9
0
 public static MDbgEngine @break(this MDbgEngine engine)
 {
     engine.activeProcess().AsyncStop().WaitOne();
     return(engine);
 }
Example #10
0
 public static MDbgEngine go(this MDbgEngine engine)
 {
     engine.activeProcess().Go();
     return(engine);
 }
Example #11
0
 public static MDbgModule module(this  MDbgEngine engine, string moduleName)
 {
     return(engine.activeProcess().Modules.Lookup(moduleName));
 }
Example #12
0
 public static MDbgThread activeThread(this MDbgEngine engine)
 {
     return(engine.activeProcess().Threads.Active);
 }