怎么正确调用Openprocess方法?
需要调用哪些DLL和命名空间?我用的是C#+VS2005.usingSystem;usingSystem.Collections.Generic;usingSystem....
需要调用哪些DLL和命名空间?我用的是C#+VS2005. using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Text; using System.Windows.Forms; using System.Runtime.InteropServices; namespace 练习 { public partial class Form1 : Form { [DllImport("kernel32.dll")] public static extern int ReadProcessMemory( int hProcess, uint lpBaseAddress, byte[] lpBuffer, int nSize, int lpNumberOfBytesRead ); public Form1() { InitializeComponent(); } private void button1_Click(object sender, EventArgs e) { System.Diagnostics.Process[] gp = System.Diagnostics.Process.GetProcessesByName("QQ"); int processid = gp[0].Id; int process=openproces //就是这里,没显示有这个函数!!! MessageBox.Show(processid.ToString()); } } }
展开
2个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询