View previous topic :: View next topic |
Author |
Message |
torpin005 Master Cheater
Reputation: 0
Joined: 19 Nov 2007 Posts: 255
|
Posted: Fri May 30, 2008 7:34 pm Post subject: wiccaan, question about... |
|
|
Heyy Wiccaan, remember a long time ago when i asked if there was a code that cud auto close calc.exe when its opened?
and u gave me a code for it, but my comp got crashed and i lost it, can u link me to the post, or repost the code?
thanks
_________________
Go check it out. Good Hacks |
|
Back to top |
|
 |
oib111 I post too much
Reputation: 0
Joined: 02 Apr 2007 Posts: 2947 Location: you wanna know why?
|
Posted: Fri May 30, 2008 9:41 pm Post subject: |
|
|
Code: |
HANDLE hProcess;
HANDLE hSnapshot = CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, NULL);
PROCESSENTRY32 pe32;
pe32.dwSize = sizeof(PROCESSENTRY32);
Process32First(hSnapshot, &pe32);
do {
if(strcmp(pe32.szExeFile, "calc.exe") == 0) {
hProcess = OpenProcess(PROCESS_TERMINATE, NULL, pe32.th32ProcessID);
TerminateProcess(hProcess, 0);
CloseHandle(hSnapshot);
CloseHandle(hProcess);
}
} while(Process32Next(hSnapshot, &pe32));
|
_________________
8D wrote: |
cigs dont make people high, which weed does, which causes them to do bad stuff. like killing |
|
|
Back to top |
|
 |
torpin005 Master Cheater
Reputation: 0
Joined: 19 Nov 2007 Posts: 255
|
Posted: Fri May 30, 2008 9:46 pm Post subject: |
|
|
it doesnt work, do i need to do anyrhing to it, or jsut put under form_load?
_________________
Go check it out. Good Hacks |
|
Back to top |
|
 |
oib111 I post too much
Reputation: 0
Joined: 02 Apr 2007 Posts: 2947 Location: you wanna know why?
|
Posted: Fri May 30, 2008 9:57 pm Post subject: |
|
|
Well, assuming your using C++ you have to include Tlhelp32.h. But I guess your not because you mentioned form_load. Isn't that delphi?
_________________
8D wrote: |
cigs dont make people high, which weed does, which causes them to do bad stuff. like killing |
|
|
Back to top |
|
 |
torpin005 Master Cheater
Reputation: 0
Joined: 19 Nov 2007 Posts: 255
|
Posted: Fri May 30, 2008 10:00 pm Post subject: |
|
|
oh, wiccaan made me one for vb6
_________________
Go check it out. Good Hacks |
|
Back to top |
|
 |
atom0s Moderator
Reputation: 205
Joined: 25 Jan 2006 Posts: 8587 Location: 127.0.0.1
|
|
Back to top |
|
 |
torpin005 Master Cheater
Reputation: 0
Joined: 19 Nov 2007 Posts: 255
|
Posted: Sat May 31, 2008 8:49 am Post subject: |
|
|
thank you wiccaan =)
can u tell me what part of that declares the process to kill?
_________________
Go check it out. Good Hacks |
|
Back to top |
|
 |
HalfPrime Grandmaster Cheater
Reputation: 0
Joined: 12 Mar 2008 Posts: 532 Location: Right there...On your monitor
|
Posted: Sat May 31, 2008 10:08 am Post subject: |
|
|
I belive it would be
Code: | If Right$(LCase$(Left$(pe32.szexeFile, InStr(1, pe32.szexeFile, Chr(0)) - 1)), Len("calc.exe")) = LCase$("calc.exe") Then
|
_________________
|
|
Back to top |
|
 |
|