相关疑难解决方法(0)

使用System :: AnsiString类

我正在尝试从以下答案中导入代码:获取完整的运行进程列表(Visual C ++)

bool FindRunningProcess(AnsiString process) {
/*
Function takes in a string value for the process it is looking for like ST3Monitor.exe
then loops through all of the processes that are currently running on windows.
If the process is found it is running, therefore the function returns true.
*/
AnsiString compare;
bool procRunning = false;

HANDLE hProcessSnap;
PROCESSENTRY32 pe32;
hProcessSnap = CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, 0);

if (hProcessSnap == INVALID_HANDLE_VALUE) {
    procRunning = false;
} else {
    pe32.dwSize = sizeof(PROCESSENTRY32);
    if …
Run Code Online (Sandbox Code Playgroud)

c++ winapi

1
推荐指数
1
解决办法
2313
查看次数

标签 统计

c++ ×1

winapi ×1