Example #1
0
        public void EnumerateRemoteSectionsAndModules(IntPtr process, Action <Section> callbackSection, Action <Module> callbackModule)
        {
            var c1 = callbackSection == null ? null : (EnumerateRemoteSectionCallback) delegate(ref EnumerateRemoteSectionData data)
            {
                callbackSection(new Section
                {
                    Start      = data.BaseAddress,
                    End        = data.BaseAddress.Add(data.Size),
                    Size       = data.Size,
                    Name       = data.Name,
                    Protection = data.Protection,
                    Type       = data.Type,
                    ModulePath = data.ModulePath,
                    ModuleName = Path.GetFileName(data.ModulePath),
                    Category   = data.Category
                });
            };

            var c2 = callbackModule == null ? null : (EnumerateRemoteModuleCallback) delegate(ref EnumerateRemoteModuleData data)
            {
                callbackModule(new Module
                {
                    Start = data.BaseAddress,
                    End   = data.BaseAddress.Add(data.Size),
                    Size  = data.Size,
                    Path  = data.Path,
                    Name  = Path.GetFileName(data.Path)
                });
            };

            CurrentFunctions.EnumerateRemoteSectionsAndModules(process, c1, c2);
        }
Example #2
0
        public void EnumerateProcesses(Action <ProcessInfo> callbackProcess)
        {
            var c = callbackProcess == null ? null : (EnumerateProcessCallback) delegate(ref EnumerateProcessData data)
            {
                callbackProcess(new ProcessInfo(data.Id, data.Name, data.Path));
            };

            CurrentFunctions.EnumerateProcesses(c);
        }
Example #3
0
 public bool SetHardwareBreakpoint(IntPtr id, IntPtr address, HardwareBreakpointRegister register, HardwareBreakpointTrigger trigger, HardwareBreakpointSize size, bool set)
 {
     return(CurrentFunctions.SetHardwareBreakpoint(id, address, register, trigger, size, set));
 }
Example #4
0
 public void HandleDebugEvent(ref DebugEvent evt)
 {
     CurrentFunctions.HandleDebugEvent(ref evt);
 }
Example #5
0
 public bool AwaitDebugEvent(ref DebugEvent evt, int timeoutInMilliseconds)
 {
     return(CurrentFunctions.AwaitDebugEvent(ref evt, timeoutInMilliseconds));
 }
Example #6
0
 public bool AttachDebuggerToProcess(IntPtr id)
 {
     return(CurrentFunctions.AttachDebuggerToProcess(id));
 }
Example #7
0
 public void DetachDebuggerFromProcess(IntPtr id)
 {
     CurrentFunctions.DetachDebuggerFromProcess(id);
 }
Example #8
0
 public void ControlRemoteProcess(IntPtr process, ControlRemoteProcessAction action)
 {
     CurrentFunctions.ControlRemoteProcess(process, action);
 }
Example #9
0
 public bool WriteRemoteMemory(IntPtr process, IntPtr address, ref byte[] buffer, int offset, int size)
 {
     return(CurrentFunctions.WriteRemoteMemory(process, address, ref buffer, offset, size));
 }
Example #10
0
 public void CloseRemoteProcess(IntPtr process)
 {
     CurrentFunctions.CloseRemoteProcess(process);
 }
Example #11
0
 public bool IsProcessValid(IntPtr process)
 {
     return(CurrentFunctions.IsProcessValid(process));
 }
Example #12
0
 public IntPtr OpenRemoteProcess(IntPtr pid, ProcessAccess desiredAccess)
 {
     return(CurrentFunctions.OpenRemoteProcess(pid, desiredAccess));
 }