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 


how to limit

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
DebugMe
Newbie cheater
Reputation: 0

Joined: 29 May 2007
Posts: 20

PostPosted: Thu Jun 07, 2007 3:02 pm    Post subject: how to limit Reply with quote

how do i limit the number of the same program being run? Like ventrillo you can't run more then 1.

thnx
Back to top
View user's profile Send private message
Noz3001
I'm a spammer
Reputation: 26

Joined: 29 May 2006
Posts: 6220
Location: /dev/null

PostPosted: Thu Jun 07, 2007 3:03 pm    Post subject: Reply with quote

Code:
if(FindWindow("YourWindowClass", "WindowName"))
 return 0;


Lol, theres load of ways. this is the easiest
Back to top
View user's profile Send private message MSN Messenger
UnLmtD
Grandmaster Cheater
Reputation: 0

Joined: 13 Mar 2007
Posts: 894
Location: Canada

PostPosted: Thu Jun 07, 2007 3:05 pm    Post subject: Reply with quote

Well there's many ways of doing it. I prefer using Mutex method.

Here's an exemple
Code:
hMutex = CreateMutex(
                  NULL,                     
                  FALSE,                     
                  "{FA531CC1-0497-11d3-A180-00105A276C3E}");

          
           if( GetLastError() == ERROR_ALREADY_EXISTS )
              {
       
                        MessageBox (hWndDlg, "Another copy is already running!", "Error", MB_OK);
                        EndDialog(hWndDlg, 0);
                   return 0;                  
              }


And before closing the application close the handle CloseHandle(hMutex);
There's more way of doing it, --> http://www.codeproject.com/cpp/limitnumins.asp

_________________
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