예제 #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);
 }
예제 #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));
        }
예제 #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);
        }
예제 #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);
        }
예제 #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);
        }
예제 #6
0
 public static MDbgEngine goAndWait(this MDbgEngine engine)
 {
     engine.activeProcess().goAndWait();
     return(engine);
 }
예제 #7
0
 public static MDbgProcess process(this MDbgEngine engine)
 {
     return(engine.activeProcess());
 }
예제 #8
0
 public static bool hasActiveProcess(this MDbgEngine engine)
 {
     return(engine.activeProcess().notNull());
 }
예제 #9
0
 public static MDbgEngine @break(this MDbgEngine engine)
 {
     engine.activeProcess().AsyncStop().WaitOne();
     return(engine);
 }
예제 #10
0
 public static MDbgEngine go(this MDbgEngine engine)
 {
     engine.activeProcess().Go();
     return(engine);
 }
예제 #11
0
 public static MDbgModule module(this  MDbgEngine engine, string moduleName)
 {
     return(engine.activeProcess().Modules.Lookup(moduleName));
 }
예제 #12
0
 public static MDbgThread activeThread(this MDbgEngine engine)
 {
     return(engine.activeProcess().Threads.Active);
 }