Wednesday, January 13, 2016
Big Brother Big Sister to ask, ask how to see on dopod700 process it, or need to download software to see it
Big Brother Big Sister to ask, ask how to see on dopod700 process it, or need to download software in order to see it, I point - & gt; Settings - & gt; memory, you can only see a few application name or point - & gt; mission, did not see anything, I set a bad, or do you want to download the software to see the process of it
Reply:
You can write your own one ah
CreateToolhelp32Snapshot
Reply:
Can you tell me why can not the process of closing it,
Reply:
void EnumProcessList ()
{
HANDLE hProcessShot = CreateToolhelp32Snapshot (TH32CS_SNAPPROCESS, 0);
TCHAR a [260];
if (hProcessShot == INVALID_HANDLE_VALUE)
{
MessageBox (NULL, TEXT ("111"), TEXT (""), MB_OK);
}
else
{
PROCESSENTRY32 pe32;
pe32.dwSize = sizeof (pe32);
if (Process32First (hProcessShot, & amp; pe32))
{
do {
swprintf (a, TEXT ("% s"), pe32.szExeFile);
TCHAR PhoneProName [] = TEXT ("cprog.exe");
if (! wcscmp (pe32.szExeFile, PhoneProName))
{
OpenforProcess ();
DWORD cprogID = pe32.th32ProcessID;
HANDLE hcprogID = OpenProcess (0, FALSE, cprogID);
BOOL s1 = 0;
BOOL ss = 0;
DWORD uExitCode;
LPDWORD lpExitCode = NULL;
ss = GetExitCodeProcess (hcprogID, lpExitCode);
DWORD s3 = GetLastError ();
uExitCode = * lpExitCode;
TerminateProcess (hcprogID, uExitCode);
int s2 = 10;
}
}
while (Process32Next (hProcessShot, & amp; pe32));
}
}
CloseHandle (hProcessShot);
}
Reply:
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, & amp; 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 ("Error number:% d"), GetLastError ());
AfxMessageBox (strError, MB_OK | MB_ICONINFORMATION, NULL);
}
cntTerminate ++;
}
else
{
CString strError;
strError.Format (_T ("Error number:% d"), GetLastError ());
if (GetLastError () == ERROR_ACCESS_DENIED)
strError = _T ("Access Denied!") + strError;
AfxMessageBox (strError, MB_OK | MB_ICONINFORMATION, NULL);
}
}
}
while (Process32Next (hSnapshot, & amp; 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 ("Error number:% d"), GetLastError ());
AfxMessageBox (strError, MB_OK | MB_ICONINFORMATION, NULL);
}
}
else
{
CString strError;
strError.Format (_T ("Error number:% d"), GetLastError ());
if (GetLastError () == ERROR_ACCESS_DENIED)
strError = _T ("Access Denied!") + strError;
AfxMessageBox (strError, MB_OK | MB_ICONINFORMATION, NULL);
}
if (cntTerminate ++ & gt; = 1)
{
break;
}
}
}
// CloseToolhelp32Snapshot (hSnapshot);
CloseHandle (hSnapshot);
}
return (cntTerminate & gt; 0);
}
Reply:
Agree upstairs, with Toolhelp, LZ has EMAIL then I can give you tools to write their own, usually Shasha program can also be used
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment