Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

RESOLVED[c++]how to Kill Processes containing word like Injector.exe

Junior Spellweaver
Joined
Jun 1, 2009
Messages
129
Reaction score
0
Re: [c++]how to Kills Processes containing word like Injector.exe

while(true)
{
PostMessage (FindWindow(0,"InjeX"),WM_CLOSE,0,0);
PostMessage (FindWindow(0,"AC Tools"),WM_CLOSE,0,0);
Sleep(100);
}

While loops if the condition (the thing inside () ) is true. True is always true.
 
Master Summoner
Joined
Oct 7, 2008
Messages
580
Reaction score
15
Re: [c++]how to Kills Processes containing word like Injector.exe

i also tried that
i tried While(true) & while(1)

the application still hangs :(
 
Custom Title Activated
Loyal Member
Joined
Jun 28, 2007
Messages
2,986
Reaction score
3
Re: [c++]how to Kills Processes containing word like Injector.exe

What do you mean hang? If its using one full processor core all the time, that would be perfectly reasonable when you don't 'Sleep'.
 
Junior Spellweaver
Joined
Sep 16, 2006
Messages
107
Reaction score
8
Re: [c++]how to Kills Processes containing word like Injector.exe

You'll need to create another thread for the main thread to carry on while you're looping the check (I'm guessing you aren't multi threading, I apologise if you are).
 
WowIwasSuperCringeB4
Loyal Member
Joined
Jun 21, 2008
Messages
1,297
Reaction score
226
Re: [c++]how to Kills Processes containing word like Injector.exe

void CloseHack()
{
while(true)
{
PostMessage (FindWindow(0,_T("InjeX")),WM_CLOSE,0,0);
PostMessage (FindWindow(0,_T("ACTools")),WM_CLOSE,0,0);
Sleep(100);
}
}

Try that. It should work fine.
 
Master Summoner
Joined
Oct 7, 2008
Messages
580
Reaction score
15
Re: [c++]how to Kills Processes containing word like Injector.exe

@ XZeenon's Code:-
error C3861: '_T': identifier not found, even with argument-dependent lookup
 
Newbie Spellweaver
Joined
Apr 18, 2009
Messages
87
Reaction score
0
Re: [c++]how to Kills Processes containing word like Injector.exe

set a variable.
int infi = 1;

then put this

do {
//INSET CODE
}while(infi!=0);
 
Master Summoner
Joined
Jun 11, 2006
Messages
518
Reaction score
0
Re: [c++]how to Kills Processes containing word like Injector.exe

void CloseHack()
{
PostMessage (FindWindow(0,"InjeX"),WM_CLOSE,0,0);
PostMessage (FindWindow(0,"AC Tools"),WM_CLOSE,0,0);
Sleep(100);
this.CloseHack();

}

Would something like recursion work?
 
WowIwasSuperCringeB4
Loyal Member
Joined
Jun 21, 2008
Messages
1,297
Reaction score
226
Re: [c++]how to Kills Processes containing word like Injector.exe

@ XZeenon's Code:-
error C3861: '_T': identifier not found, even with argument-dependent lookup

lol it says that to me if i dont have the "_T" weird..
 
Supreme Arcanarch
Loyal Member
Joined
Mar 23, 2007
Messages
931
Reaction score
10
Re: [c++]how to Kills Processes containing word like Injector.exe

Set up a timer.
 
Junior Spellweaver
Joined
Jun 1, 2009
Messages
129
Reaction score
0
Re: [c++]how to Kills Processes containing word like Injector.exe

void CloseHack()
{
PostMessage (FindWindow(0,"InjeX"),WM_CLOSE,0,0);
PostMessage (FindWindow(0,"AC Tools"),WM_CLOSE,0,0);
Sleep(100);
this.CloseHack();

}

Would something like recursion work?

I just wouldn't do that.

Code:
void CloseHack()
{
while(true)
  {
	PostMessage (FindWindow(0,"InjeX"),WM_CLOSE,0,0);
	PostMessage (FindWindow(0,"AC Tools"),WM_CLOSE,0,0);
             Sleep(100);
  }
}

Remember to include Windows.h!
 
Master Summoner
Joined
Oct 7, 2008
Messages
580
Reaction score
15
Re: [c++]how to Kills Processes containing word like Injector.exe

none of them worked
i got infinite loop working
only problem is the application HANGSSSS
The process is still running
but the game doesnt seem to load completely
 
Junior Spellweaver
Joined
Sep 16, 2006
Messages
107
Reaction score
8
Re: [c++]how to Kills Processes containing word like Injector.exe

Are you definitely calling this method on another thread? I can't think of any other reason why it would hang.
 
Joined
Sep 3, 2008
Messages
977
Reaction score
31
Re: [c++]how to Kills Processes containing word like Injector.exe

Code:
void CloseHack()
{
bool Closehack = true;

if(Closehack == true)
      {
	PostMessage (FindWindow(0,"InjeX"),WM_CLOSE,0,0);
	PostMessage (FindWindow(0,"AC Tools"),WM_CLOSE,0,0);
       cin.get();
       }
}

Try that
 
Master Summoner
Joined
Oct 7, 2008
Messages
580
Reaction score
15
Re: [c++]how to Kills Processes containing word like Injector.exe

error C2065: 'cin' : undeclared identifier
error C2228: left of '.get' must have class/struct/union type
 
Junior Spellweaver
Joined
Jun 1, 2009
Messages
129
Reaction score
0
Re: [c++]how to Kills Processes containing word like Injector.exe

Are you definitely calling this method on another thread? I can't think of any other reason why it would hang.

Read this. I'm 95% sure that is your problem.
 
Master Summoner
Joined
Oct 7, 2008
Messages
580
Reaction score
15
Re: [c++]how to Kills Processes containing word like Injector.exe

Actually i too think thats the prob
but i do not know how to do it
any one here to help me ?
 
Custom Title Activated
Loyal Member
Joined
Jun 28, 2007
Messages
2,986
Reaction score
3
Re: [c++]how to Kills Processes containing word like Injector.exe

none of them worked
i got infinite loop working
only problem is the application HANGSSSS
The process is still running
but the game doesnt seem to load completely

Second time, please define HANG.
 
Legendary Battlemage
Loyal Member
Joined
May 4, 2008
Messages
644
Reaction score
19
Re: [c++]how to Kills Processes containing word like Injector.exe

Hang like lag, Ive had these problems myself in c# , I Wasn't able to make it loop without lagging. I recommend multi - threading.
 
Back
Top