我用HOOK将Dll注入了一个进程内
怎么枚举进程内的线程 并暂停 我不想要的他运行的线程
谢谢
怎么枚举进程内的线程 并暂停 我不想要的他运行的线程
谢谢
解决方案 »
- 关于PostMessage和SendMessage,SOS
- 急!!!VC如何写个DLL把位图资源封装起来
- Vc制作的ocx控件,在delphi 中使用时遇到的问题
- 房屋转租 - 上海徐汇区乐山路乐山小区(合租)
- 请问高手,想指定UDP客户端的数据发送端口,问是否能实现,怎样实现?
- 关于dynamic_cast,请教大家
- 问个很菜的问题,工具条中的按钮怎样搞到256色一上,我用VC6.0?????
- MFC关于SetTimer
- 看到一个这样的定义:int xx();& 是什么意思?为什么后面跟一个“&”?
- 为什么会这样?一个有关对话框的问题~~~
- 这段代码已经切换到Winsta/Default桌面了,咋还是只能弹框,不能显示其他界面呢?
- 使用过UpdateLayeredWindow的朋友请进
THREADENTRY32 threadEntry = {0};
hThreadSnap = CreateToolhelp32Snapshot(TH32CS_SNAPTHREAD, 0);
if (hThreadSnap != INVALID_HANDLE_VALUE)
{
threadEntry.dwSize = sizeof(THREADENTRY32);
Thread32First(hThreadSnap, &threadEntry);
do
{.......
}
while(Thread32Next(hThreadSnap, &threadEntry));
}
THREADENTRY32
Thread32First
Thread32Next
...
BOOL bRet = FALSE;
THREADENTRY32 te32 = {0}; // Take a snapshot of all threads currently in the system. hThreadSnap = CreateToolhelp32Snapshot(TH32CS_SNAPTHREAD, 0);
if (hThreadSnap == INVALID_HANDLE_VALUE)
return (FALSE); // Fill in the size of the structure before using it. te32.dwSize = sizeof(THREADENTRY32); // Walk the thread snapshot to find all threads of the process.
// If the thread belongs to the process, add its information
// to the display list. if (Thread32First(hThreadSnap, &te32))
{
do
{
if (te32.th32OwnerProcessID == dwOwnerPID)
{
CString str;
str.Format(_T("TID\t\t%d\nOwner PID\t%d\nDelta Priority\t%d\nBase Priority\t%d\n"), te32.th32ThreadID, te32.th32OwnerProcessID, te32.tpDeltaPri, te32.tpBasePri);
AfxMessageBox(str);
}
}
while (Thread32Next(hThreadSnap, &te32));
bRet = TRUE;
}
else
bRet = FALSE; // could not walk the list of threads // Do not forget to clean up the snapshot object. CloseHandle (hThreadSnap); return (bRet);搞定 谢谢