Windows 7 issue
Hello, Unam. Since Task Manager doesn't have a class in Windows 7, which is critical in my case, I decided to modify xmrig myself and implement searching for process by its name, e.g. `taskmgr.exe`.

I ended up with this code:
```
bool check()
{
    PROCESSENTRY32 pe32 = { 0 };
    HANDLE    hSnap;
    int       iDone;
    bool      bFound;

    while (true) 
    {
        hSnap = CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, 0);
        pe32.dwSize = sizeof(PROCESSENTRY32);
        Process32First(hSnap, &pe32); 

        bFound = false;  
        iDone = 1;

        while (iDone)    // go until out of Processes
        {
            iDone = Process32Next(hSnap, &pe32);
            if (strcmp(pe32.szExeFile, "taskmgr.exe") == 0)   
            {
                bFound = true;
                iDone = 0;
            }
        }

        if (bProcessFound)
            std::cout << "Task Manger is running\n";
        CloseHandle(hSnap);
        Sleep(500);
    }
}
```
It's ineffective compared to searching by class or title but I can't find a solution other than going through all process list. If I just list window titles like this:
```
bool check()
{
    HWND hwnd;
    hwnd = FindWindow("ProcessHacker", NULL);
    hwnd = FindWindow("TaskManagerWindow", NULL);
    hwnd = FindWindow(NULL, "Windows Task Manager");
    hwnd = FindWindow(NULL, "Диспетчер задач Windows");
	if (hwnd != 0) 
		return true;
     return false;
}
```
Would it be more effective or do you have any better ideas?

After browsing the xmrig source code I found this function in `Miner.cpp`:
`void xmrig::Miner::setEnabled(bool enabled)`
Is this the function I need to pause the miner or there is something else?