请教大哥大姐,问下怎么在dopod700上看到进程呢,还是需要下载软件才能看到呢
请教大哥大姐,问下怎么在dopod700上看到进程呢,还是需要下载软件才能看到呢,我点开始-> 设置-> 内存,就只能看到几个应用程序名或点开始-> 任务,什么都没看到,是我设置不好么,还是要下载软件才能看到进程呢
[解决办法]
BOOL PDATerminateProc(CString ProcToKill)
{
int cntTerminate=0;
HANDLE hSnapshot=INVALID_HANDLE_VALUE;
PROCESSENTRY32 procEntry;
procEntry.dwSize=sizeof(PROCESSENTRY32);
CString szProcName;
hSnapshot=CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS,0);
if (hSnapshot)
{
if (Process32First(hSnapshot,&procEntry))
{
szProcName=procEntry.szExeFile;
if (!szProcName.CompareNoCase(ProcToKill))
{
HANDLE hProcess = OpenProcess(
PROCESS_TERMINATE,FALSE,procEntry.th32ProcessID);
if(hProcess)
{
if(!TerminateProcess(hProcess,0))
{
CString strError;
strError.Format(_T( "错误号:%d "),GetLastError());
AfxMessageBox(strError,MB_OK|MB_ICONINFORMATION,NULL);
}
cntTerminate++;
}
else
{
CString strError;
strError.Format(_T( "错误号:%d "),GetLastError());
if(GetLastError()==ERROR_ACCESS_DENIED)
strError=_T( "拒绝访问! ")+strError;
AfxMessageBox(strError,MB_OK|MB_ICONINFORMATION,NULL);
}
}
}
while(Process32Next(hSnapshot,&procEntry))
{
szProcName=procEntry.szExeFile;
if (!szProcName.CompareNoCase(ProcToKill))
{
HANDLE hProcess = OpenProcess(
PROCESS_TERMINATE,FALSE,procEntry.th32ProcessID);
if(hProcess)
{
if(!TerminateProcess(hProcess,0))
{
CString strError;
strError.Format(_T( "错误号:%d "),GetLastError());
AfxMessageBox(strError,MB_OK|MB_ICONINFORMATION,NULL);
}
}
else
{
CString strError;
strError.Format(_T( "错误号:%d "),GetLastError());
if(GetLastError()==ERROR_ACCESS_DENIED)
strError=_T( "拒绝访问! ")+strError;
AfxMessageBox(strError,MB_OK|MB_ICONINFORMATION,NULL);
}
if (cntTerminate++> =1)
{
break;
}
}
}
//CloseToolhelp32Snapshot(hSnapshot);
CloseHandle(hSnapshot);
}
return (cntTerminate> 0);
}