void CPythonApplication::GetMousePosition(..)
{
...
}
//Altına ekle:
bool CPythonApplication::IsProcessRunning(const char* processName)
{
HANDLE hSnapshot = CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, 0);
if (hSnapshot == INVALID_HANDLE_VALUE)
return false;
PROCESSENTRY32 pe32;
pe32.dwSize = sizeof(PROCESSENTRY32);
if (Process32First(hSnapshot, &pe32))
{
do
{
if (strcmp(pe32.szExeFile, processName) == 0)
{
CloseHandle(hSnapshot);
return true;
}
} while (Process32Next(hSnapshot, &pe32));
}
CloseHandle(hSnapshot);
return false;
}