void CPocket1Dlg::OnButton1()
{
HANDLE handle = CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS,0);
PROCESSENTRY32 proinfo;
if (Process32First(handle,&proinfo))
{
CString str;
while (1)
{
str.Format(L"%s:%d/r/n",proinfo.szExeFile,proinfo.th32ProcessID);
m_editval += str;
if (!Process32Next(handle,&proinfo))
{
break;
}
}
UpdateData(FALSE);
}
else
{
return ;
}
}
读取各进程信息
最新推荐文章于 2023-08-28 18:20:59 发布