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