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相关推荐

  1. 使用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 ...

  2. Mr. Process的一生-Linux内核的社会视角 (2)启动

    原文地址: http://www.manio.org/cn/startup-of-linux-view-of-society.html 其实这才应该是这一系列文章的第一节,因为这篇文章讲的是盘古开天地 ...

  3. 【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 ...

  4. 【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 ...

  5. 守护进程中创建的对象php,在PHP中生成守护进程(Daemon Process)

    前两天看到一篇文章<如何使用PHP编写daemon process>,其中对核心代码却没有细说,我又查了一些资料,还看了一本<理解Unix进程>,才搞明白生成守护进程的时候发生 ...

  6. template.process(root, out)的用法(shiro项目中来的九)

    假如你现在还在为自己的技术担忧,假如你现在想提升自己的工资,假如你想在职场上获得更多的话语权,假如你想顺利的度过35岁这个魔咒,假如你想体验BAT的工作环境,那么现在请我们一起开启提升技术之旅吧,详情 ...

  7. 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 ...

  8. symfony2 Process 组件的学习笔记

    2019独角兽企业重金招聘Python工程师标准>>> 安装 composer require "symfony/process:2.7.1" ##描述 proc ...

  9. 用计算机的英语造句process,process的用法总结大全

    process的意思 n. 过程,工序,做事方法,工艺流程 vt. 加工,处理,审阅,审核 vi. 列队行进 adj. 经过特殊加工(或处理)的 变形:过去式: processed: 现在分词:pro ...

  10. 关于v$process与v$session中process的理解

    v$session有个process字段,V$PROCESS有个SPID字段,这两个字段是不是一个意思呢?是不是都代表会话的操作系统进程呢? 官方文档上的解释: SPID      VARCHAR2( ...

最新文章

  1. python正则表达式需要模块_使用Python正则表达式模块,让操作更加简单
  2. mock模拟的数据能增删改查吗_Mock.js模拟数据,脱离后端独立开发,实现增删改查功能...
  3. C#实现枚举的相关操作
  4. boost::geometry::point_on_surface用法的测试程序
  5. Fbric、Ansible、Docker、Chaos Monkey:DevOps工具的年中回顾
  6. SaaS市场普及 网络推广策略最有效
  7. svn之迁移代码技巧
  8. 前端学习(1611):redux使用
  9. [转]四边形不等式优化dp(POJ1160)
  10. 最全MySQL数据类型详解
  11. 武汉科技大学计算机课程设置,武汉科技大学课程建设管理办法
  12. React:一、初识react
  13. word2vec训练中文词向量
  14. wireshark抓包分析(二)之链路层Frame
  15. visio2010 去除跨线
  16. 根据数据库表字段动态生成选择画面[FREE_SELECTIONS_DIALOG FREE_SELECTIONS_INIT]
  17. 安卓开发学习(只有java基础)
  18. 安全:屏蔽恶意网站 恶意网址库
  19. Python入门——一维数据、二维数据、多维数据、高维数据
  20. Latex写作会议论文中多位作者、机构的排版

热门文章

  1. echars山东地图
  2. hyper服务器虚拟网卡和实际网卡,关于Hyper-V虚拟机中的vEthernet虚拟网卡不能联网的问题...
  3. struts2小小项目 经验总结(3) 调用python
  4. 如何在Axure 9.0 中使用echarts
  5. 语音转文字软件哪个比较好用
  6. 银行业务中贷款算法等额本金等额本息算法程序
  7. 爱签电子合同助力医院患者信息表跨科室在线签署,实名认证、自动归档
  8. java实现对Json文件及字符串的格式美化及修改调整
  9. java实现Json格式美化
  10. Python 美化 json 输出