#include <afx.h>
#include <afxwin.h>
#include <TlHelp32.h>
#pragma comment(lib,"th32.lib")
void OnGetProcess()     
{   
HANDLE   hProcessSnap=NULL;   
PROCESSENTRY32   pe32={0};   
hProcessSnap=CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS,0);   
if(hProcessSnap==(HANDLE)-1)   
{   
::MessageBox(NULL,_T("查询进程失败!:("),_T("错误提示"),MB_OK);   
}   
pe32.dwSize=sizeof(PROCESSENTRY32);   
if(Process32First(hProcessSnap,&pe32))   
{   
do   
{   
//假设你的程序名字为abc.exe,这里进行判断   
if(!lstrcmp(pe32.szExeFile,_T("abc.exe")))   
{   
//判断到进程模块名和你的程序名字一样,然后加入你的处理代码   
}   
}   
while(Process32Next(hProcessSnap,&pe32));   
}   
else   
{   
::MessageBox(NULL,_T("出现意外错误!"),_T("错误提示"),MB_OK);   
}   
CloseHandle(hProcessSnap);   
}编译提示错误:错误 1 error LNK2019: 无法解析的外部符号 Process32Next,该符号在函数 "void __cdecl OnGetProcess(void)" (?OnGetProcess@@YAXXZ) 中被引用 guard.obj
错误 2 error LNK2019: 无法解析的外部符号 Process32First,该符号在函数 "void __cdecl OnGetProcess(void)" (?OnGetProcess@@YAXXZ) 中被引用 guard.obj
错误 3 error LNK2019: 无法解析的外部符号 CreateToolhelp32Snapshot,该符号在函数 "void __cdecl OnGetProcess(void)" (?OnGetProcess@@YAXXZ) 中被引用 guard.obj