Process.Net
ProcessSharp的构造函数,对应的测试是
https://github.com/lolp1/Process.NET/blob/master/test/Process.NET.Test/Core/ProcessSharpTest.cs
/// <summary>/// Initializes a new instance of the <see cref="ProcessSharp" /> class./// </summary>/// <param name="native">The native process.</param>/// <param name="type">The type of memory being manipulated.</param>public ProcessSharp(System.Diagnostics.Process native,MemoryType type){native.EnableRaisingEvents = true;native.Exited += (s, e) =>{ProcessExited?.Invoke(s, e);HandleProcessExiting();};Native = native;Handle = MemoryHelper.OpenProcess(ProcessAccessFlags.AllAccess, Native.Id);switch (type){case MemoryType.Local:Memory = new LocalProcessMemory(Handle);break;case MemoryType.Remote:Memory = new ExternalProcessMemory(Handle);break;default:throw new ArgumentOutOfRangeException(nameof(type), type, null);}native.ErrorDataReceived += OutputDataReceived;native.OutputDataReceived += OutputDataReceived;ThreadFactory = new ThreadFactory(this);ModuleFactory = new ModuleFactory(this);MemoryFactory = new MemoryFactory(this);WindowFactory = new WindowFactory(this);}
https://github.com/lolp1/Process.NET/blob/master/src/Process.NET/Memory/ExternalProcessMemory.cs
可以尝试转换HearthBuddy中的Class276中的方法
internal IntPtr method_33(IntPtr intptr_37, string string_0, params Class276.Enum20[] enum20_0){while (intptr_37 != IntPtr.Zero){using (AllocatedMemory allocatedMemory = this.externalProcessMemory_0.CreateAllocatedMemory(256)){allocatedMemory.AllocateOfChunk<IntPtr>("Itr");IntPtr intPtr;while ((intPtr = this.method_35(intptr_37, allocatedMemory["Itr"])) != IntPtr.Zero){IntPtr intPtr2 = this.method_37(intPtr);if (this.externalProcessMemory_0.ReadStringA(intPtr2) == string_0){if (enum20_0 != null){Class276.Enum20[] array = this.method_31(intPtr);if (array.Length != enum20_0.Length || !array.SequenceEqual(enum20_0)){continue;}}return intPtr;}}intptr_37 = this.method_25(intptr_37);}}return IntPtr.Zero;}
转载于:https://www.cnblogs.com/chucklu/p/11376479.html
Process.Net相关推荐
- 使用Java监控工具出现 Can't attach to the process
问题重现 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 ➜ jinfo -flags 3032 Attaching ...
- Mr. Process的一生-Linux内核的社会视角 (2)启动
原文地址: http://www.manio.org/cn/startup-of-linux-view-of-society.html 其实这才应该是这一系列文章的第一节,因为这篇文章讲的是盘古开天地 ...
- 【linux】在CentOS7上更改端口号时报错:Job for sshd.service failed because the control process exited with error
1.问题描述 在在CentOS7上更改端口号时报错: Job for sshd.service failed because the control process exited with error ...
- 【Qt】ubuntu14.04.5 qt5.6中使用opencv3.4报错:Using GTK+ 2.x and GTK+ 3 in the same process is not supported
问题描述 ubuntu14.04.5 qt5.6中使用opencv3.4报错: Using GTK+ 2.x and GTK+ 3 in the same process is not support ...
- 守护进程中创建的对象php,在PHP中生成守护进程(Daemon Process)
前两天看到一篇文章<如何使用PHP编写daemon process>,其中对核心代码却没有细说,我又查了一些资料,还看了一本<理解Unix进程>,才搞明白生成守护进程的时候发生 ...
- template.process(root, out)的用法(shiro项目中来的九)
假如你现在还在为自己的技术担忧,假如你现在想提升自己的工资,假如你想在职场上获得更多的话语权,假如你想顺利的度过35岁这个魔咒,假如你想体验BAT的工作环境,那么现在请我们一起开启提升技术之旅吧,详情 ...
- Error:Execution failed for task ':app:dexDebug'. com.android.ide.common.process.ProcessException
异常Log: Error:Execution failed for task ':app:dexDebug'. > com.android.ide.common.process.Process ...
- symfony2 Process 组件的学习笔记
2019独角兽企业重金招聘Python工程师标准>>> 安装 composer require "symfony/process:2.7.1" ##描述 proc ...
- 用计算机的英语造句process,process的用法总结大全
process的意思 n. 过程,工序,做事方法,工艺流程 vt. 加工,处理,审阅,审核 vi. 列队行进 adj. 经过特殊加工(或处理)的 变形:过去式: processed: 现在分词:pro ...
- 关于v$process与v$session中process的理解
v$session有个process字段,V$PROCESS有个SPID字段,这两个字段是不是一个意思呢?是不是都代表会话的操作系统进程呢? 官方文档上的解释: SPID VARCHAR2( ...
最新文章
- python正则表达式需要模块_使用Python正则表达式模块,让操作更加简单
- mock模拟的数据能增删改查吗_Mock.js模拟数据,脱离后端独立开发,实现增删改查功能...
- C#实现枚举的相关操作
- boost::geometry::point_on_surface用法的测试程序
- Fbric、Ansible、Docker、Chaos Monkey:DevOps工具的年中回顾
- SaaS市场普及 网络推广策略最有效
- svn之迁移代码技巧
- 前端学习(1611):redux使用
- [转]四边形不等式优化dp(POJ1160)
- 最全MySQL数据类型详解
- 武汉科技大学计算机课程设置,武汉科技大学课程建设管理办法
- React:一、初识react
- word2vec训练中文词向量
- wireshark抓包分析(二)之链路层Frame
- visio2010 去除跨线
- 根据数据库表字段动态生成选择画面[FREE_SELECTIONS_DIALOG FREE_SELECTIONS_INIT]
- 安卓开发学习(只有java基础)
- 安全:屏蔽恶意网站 恶意网址库
- Python入门——一维数据、二维数据、多维数据、高维数据
- Latex写作会议论文中多位作者、机构的排版