Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


wiccaan, question about...

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
torpin005
Master Cheater
Reputation: 0

Joined: 19 Nov 2007
Posts: 255

PostPosted: Fri May 30, 2008 7:34 pm    Post subject: wiccaan, question about... Reply with quote

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
View user's profile Send private message AIM Address
oib111
I post too much
Reputation: 0

Joined: 02 Apr 2007
Posts: 2947
Location: you wanna know why?

PostPosted: Fri May 30, 2008 9:41 pm    Post subject: Reply with quote

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
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
torpin005
Master Cheater
Reputation: 0

Joined: 19 Nov 2007
Posts: 255

PostPosted: Fri May 30, 2008 9:46 pm    Post subject: Reply with quote

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
View user's profile Send private message AIM Address
oib111
I post too much
Reputation: 0

Joined: 02 Apr 2007
Posts: 2947
Location: you wanna know why?

PostPosted: Fri May 30, 2008 9:57 pm    Post subject: Reply with quote

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
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
torpin005
Master Cheater
Reputation: 0

Joined: 19 Nov 2007
Posts: 255

PostPosted: Fri May 30, 2008 10:00 pm    Post subject: Reply with quote

oh, wiccaan made me one for vb6
_________________


Go check it out. Good Hacks
Back to top
View user's profile Send private message AIM Address
atom0s
Moderator
Reputation: 205

Joined: 25 Jan 2006
Posts: 8587
Location: 127.0.0.1

PostPosted: Fri May 30, 2008 10:55 pm    Post subject: Reply with quote

Here ya go:
http://forum.cheatengine.org/viewtopic.php?t=181191

_________________
- Retired.
Back to top
View user's profile Send private message Visit poster's website
torpin005
Master Cheater
Reputation: 0

Joined: 19 Nov 2007
Posts: 255

PostPosted: Sat May 31, 2008 8:49 am    Post subject: Reply with quote

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
View user's profile Send private message AIM Address
HalfPrime
Grandmaster Cheater
Reputation: 0

Joined: 12 Mar 2008
Posts: 532
Location: Right there...On your monitor

PostPosted: Sat May 31, 2008 10:08 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites