Exemple #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);
        }
Exemple #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);
        }
Exemple #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));
 }
Exemple #4
0
 public void HandleDebugEvent(ref DebugEvent evt)
 {
     CurrentFunctions.HandleDebugEvent(ref evt);
 }
Exemple #5
0
 public bool AwaitDebugEvent(ref DebugEvent evt, int timeoutInMilliseconds)
 {
     return(CurrentFunctions.AwaitDebugEvent(ref evt, timeoutInMilliseconds));
 }
Exemple #6
0
 public bool AttachDebuggerToProcess(IntPtr id)
 {
     return(CurrentFunctions.AttachDebuggerToProcess(id));
 }
Exemple #7
0
 public void DetachDebuggerFromProcess(IntPtr id)
 {
     CurrentFunctions.DetachDebuggerFromProcess(id);
 }
Exemple #8
0
 public void ControlRemoteProcess(IntPtr process, ControlRemoteProcessAction action)
 {
     CurrentFunctions.ControlRemoteProcess(process, action);
 }
Exemple #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));
 }
Exemple #10
0
 public void CloseRemoteProcess(IntPtr process)
 {
     CurrentFunctions.CloseRemoteProcess(process);
 }
Exemple #11
0
 public bool IsProcessValid(IntPtr process)
 {
     return(CurrentFunctions.IsProcessValid(process));
 }
Exemple #12
0
 public IntPtr OpenRemoteProcess(IntPtr pid, ProcessAccess desiredAccess)
 {
     return(CurrentFunctions.OpenRemoteProcess(pid, desiredAccess));
 }