Originally Posted By: Razoron
This closes all Windows:
Code:
BOOL CALLBACK enumwindscb(HWND hWnd, LPARAM lParam)
{
	DWORD hwndprocid;
	HANDLE hwndproc;
	GetWindowThreadProcessId(hWnd,&hwndprocid); //Get The ProcessID of the Window
	hwndproc=OpenProcess(SYNCHRONIZE|PROCESS_TERMINATE, FALSE, hwndprocid); //Open the Process
	TerminateProcess(hwndproc,NULL); //Terminate it
	return TRUE;
}


int enumwinds()
{
	EnumWindows(enumwindscb,NULL); //Get all Windows
	return 1;
}




Stürzt da der PC ab? Oder beendet es nur alle Programme?

Wichtig!


Meine Fun Websiten
www.free4-fun.de.tl

www.gamer-liga-live.de.tl

Meine Game-Projekt Websiten
www.gamer-projects.de.tl