Hidden Process
Ok, ive been trying to create a crude cheat engine for a game.
Problem is, i can't find the process that runs the game, it is either hidden or it runs without a process?
Here is my code:
How do i find a hidden process?
Problem is, i can't find the process that runs the game, it is either hidden or it runs without a process?
Here is my code:
Code:
HANDLE hProcessSnap;
HANDLE hProcess;
PROCESSENTRY32 pe32;
hProcessSnap=CreateToolhelp32Snapshot( TH32CS_SNAPPROCESS, 0 );
pe32.dwSize = sizeof( PROCESSENTRY32 );
Process32First(hProcessSnap, &pe32);
do
{
if(strcmp(pe32.szExeFile,procID) == 0)
{
hProcess = OpenProcess(PROCESS_ALL_ACCESS, FALSE, pe32.th32ProcessID);
break;
}
}
while(Process32Next(hProcessSnap, &pe32));
CloseHandle( hProcessSnap );
if(hProcess==NULL){
DWORD proc_id;
HWND hWnd = FindWindow(NULL, app);
GetWindowThreadProcessId(hWnd, &proc_id);
hProcess = OpenProcess(PROCESS_ALL_ACCESS|PROCESS_VM_OPERATION|PROCESS_VM_READ|PROCESS_VM_WRITE|PROCESS_QUERY_INFORMATION, FALSE, proc_id);
}