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!

For Zyke: Only allow one running process at a time

Newbie Spellweaver
Joined
Sep 24, 2010
Messages
45
Reaction score
51
Hello RageZone!

I have created my Launcher using VB6 and i would like to make some security in dual client launching.. can i request some code that the launcher will detect if the game is already on?

sorry for double post i didn't see this section already...

http://forum.ragezone.com/f144/help-can-anyone-help-vb6-just-question-694793/


Hey buddy, here's a tutorial for you!

Step 1: Add this code to detect if client is running already
Step 2: Only one process will run!

C++:
Code:
#include <windows.h>
#include <stdio.h>

int main()
{
	CreateMutex(NULL, 0, "MYMUTEX12345");
	if( GetLastError() == ERROR_ALREADY_EXISTS )
	{
	    MessageBox(0, "Error; process is already running.", 0, 0);
	    return 1;
	}

	printf("Press F5 to exit loop.");

	while( !GetAsyncKeyState(VK_F5) ) Sleep(500);

	return 0;
}

Read more about mutexs:

It works the same way in any language, just import CreateMutex and GetLastError! Enjoy

Credits:
MSDN for detailed descriptions of the functions they put together to make it easier for us :D

Working on making an emulator tutorial, it's complicated to explain but I will try my best when I have some free time
 
Last edited:
Back
Top