je vole dans l espace
Griffin Premium
Dostlar c++da yeniyim ufak çaplı birkaç özelliği olan bir yazılım yapmaya çalışıyorum 1 haftadır bu kodla uğraşıyorum muhtemelen çok basit bir hata ancak yeni olduğum için çözemiyorum
Hata: "pid" tanımlayıcısı tanımlı değil.
kod:
kütüphaneler:
Acaba atladığım bir kütüphanemi var?
Yardımcı olanlara teşekkürler
Hata: "pid" tanımlayıcısı tanımlı değil.
kod:
C++:
int threadCount = 0;
processId = pid;
if (!processId) {
if (debug) {
std::cout << termcolor::red << "\nNot set Process Id. It will search for aow_exe.exe \n" << termcolor::reset;
}
HANDLE hSnap = CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, 0);
PROCESSENTRY32 pe;
pe.dwSize = sizeof(PROCESSENTRY32);
Process32First(hSnap, &pe);
while (Process32Next(hSnap, &pe)) {
if (_tcsicmp(pe.szExeFile, _T("aow_exe.exe")) == 0) {
if (pe.cntThreads > threadCount) {
threadCount = pe.cntThreads; pid = pe.th32ProcessID;
}
}
}
processId = pid;
}
if (debug) {
std::cout << termcolor::blue << "PID : " << termcolor::green << pid << " \n" << termcolor::reset;
}
kütüphaneler:
C++:
#include <Windows.h>
#include <dwmapi.h>
#include <TlHelp32.h>
#include <tchar.h>
#include <string>
#include <iostream>
#include <winternl.h>
#include <ntstatus.h>
#include <iomanip>
#pragma comment (lib, "ntdll.lib")
Acaba atladığım bir kütüphanemi var?
Yardımcı olanlara teşekkürler