#include<iostream>
#include<cstdlib>
#include<Windows.h>
using namespace std;
//判断某个窗口是否存在
int main()
{
while (1) {
HWND win = FindWindowA("ConsoleWindowClass", "Tomcat"); //寻找窗口
if (win == NULL)
{
printf("没有摘到");
Sleep(2000);
ShellExecuteA(0, "open", "startBloomberg.exe", 0, 0, 1);
Sleep(5000);
}
Sleep(2000);
}
}
#include<iostream>
#include<cstdlib>
#include<Windows.h>
#include<thread>
#include<Tlhelp32.h>
using namespace std;
void hideStartCheck() {
ShellExecuteA(0, "open", "hideCheckServer.exe", 0, 0, 0);
}
DWORD GetProcessidFromName(LPCTSTR name)
{
PROCESSENTRY32 pe;
DWORD id = 0;
HANDLE hSnapshot = CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, 0);
pe.dwSize = sizeof(PROCESSENTRY32);
if (!