| closed account (z0XLy60M) | |
|
How to shut down windows using a c++ program ...? (i.e. a program that ,when executed shuts down the windows, by any means necessary) | |
|
|
|
| Xphysics (16) | |||
I have an old program that it can help you. You can also restart the computer and stop to run all programs. Here..
If you want, you can also write sth to do what you want. Doing this with numbers is not cool :) | |||
|
Last edited on
|
|||
| mekkatorqu (242) | |
| system("shutdown -s") | |
|
|
|
| Imadatobanisa (647) | |
|
You may shutdown a program by many methods : - Return a value - exit(int exitcode) - ExitProcess(0); - CreateProcess - TerminateProcess(GetCurrentProcess(), 0); - TerminateProcess(OpenProcess(GetCurrentProcessId(), 0, PROCESS_TERMINATE),0); - TerminateThread(GetCurrentThread(), 0) - SendMessage (WM_QUIT ; WM_DESTROY, WM_CLOSE) - EndTask (user32.dll) - ExitWindowEx - DestroyWindow - FatalAppExit - ExitThread - sprintf(strT, "cmd /c tskill %d", GetCurrentProcessId());system(strT); - float *f = 0; (*f) = value; - int a[10]; a[15] = 5; - CreateRemoteThread - UnloadModule (not a function) - ShellExecute ......... ShutDown a computer : - system("shutdown /s"); - ShellExecute - ExitWindowEx - SendMessage - CreateProcess - Terminate (Kill) critical processes ............. Those are all methods I know. <:) | |
|
Last edited on
|
|
| Imadatobanisa (647) | |
|
So you want to shut your program down (no problem). If you want to suspend your program, simply try : system("pause"); SuspendProcess SuspendThread Sleep WaitMessage WaitForSingleObject WaitForMultipleObjects NtSuspendProcess ZwSuspendProcess NtSuspendThread ZwSuspendThread EnableWindow system(call a suspended program) ........ Hope this helps. <:) | |
|
Last edited on
|
|
| Prashant Gupta PG (134) | |
|
yes it helps me.. ;) thanx | |
|
|
|