我先用CreateToolhelp32Snapshot创建了快照,并且有值。
然后用Process32First获取第一个进程的信息,但是Process32First的返回值一直为0
ProcessEntry32 pe32 = new ProcessEntry32(); pe32我已经初始化
pe32.dwSize = (uint)System.Runtime.InteropServices.Marshal.SizeOf(pe32); dwSize的值也设置了
可是Process32First函数的返回值依然是0,求高人指点啊!!!
然后用Process32First获取第一个进程的信息,但是Process32First的返回值一直为0
ProcessEntry32 pe32 = new ProcessEntry32(); pe32我已经初始化
pe32.dwSize = (uint)System.Runtime.InteropServices.Marshal.SizeOf(pe32); dwSize的值也设置了
可是Process32First函数的返回值依然是0,求高人指点啊!!!
[MarshalAs(UnmanagedType.ByValTStr, SizeConst=260)]
public string szExeFile; C#中利用CreateToolhelp32Snapshot遍历系统进程