| 关键词: 数据 函数 协议 如果 缓冲区 缓冲 send SOCKET recv 套接字 |
#include "stdafx.h"#include <windows.h>#include <tlhelp32.h>int main(int argc, char* argv[]){ printf("进程ID\t\t进程名\n"); PROCESSENTRY32 pe32; pe32.dwSize = sizeof (pe32); HANDLE hProcessSnap = ::CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS,0); if(INVALID_HANDLE_VALUE == hProcessSnap) { printf("CreateToolhelp32Snapshot 调用失败\n"); return -1; } BOOL bMore = ::Process32First(hProcessSnap,&pe32); while(bMore) { printf("%5u\t%s\n",pe32.th32ProcessID,pe32.szExeFile); bMore = ::Process32Next(hProcessSnap,&pe32); } CloseHandle(hProcessSnap); return 0;} |
|
声明:文章版权归原作者所有 部分文章转自互联网 如有侵权请联系
[邮箱地址] 删除
|