• You've discovered RedGuides 📕 an EverQuest multi-boxing community 🛡️🧙🗡️. We want you to play several EQ characters at once, come join us and say hello! 👋
  • IS THIS SITE UGLY? Change the look. To dismiss this notice, click the X --->

MQ2Main.dll older than plugins. How does the check work? (1 Viewer)

Redbot

🖥️💖
Moderator
Joined
Oct 15, 2004
RedCents
88,771¢
Pronouns
He/Him
And does anyone have any idea how to break it?

It's a real pain having to recompile every single plugin every single patch. Does anyone know how the check works? I tried changing the file dates :p and obviously that did nothing.
 
Yea i am also trying to figure out how the check works cause its a huge pain in the arse lol so yea that would be wonderful if someone knew how to take it out or go around it some how.


Hell while were at it lets defeat the auth code system cause thats no fun either =)
 
smokinghot said:
Yea i am also trying to figure out how the check works cause its a huge pain in the arse lol so yea that would be wonderful if someone knew how to take it out or go around it some how.


Hell while were at it lets defeat the auth code system cause thats no fun either =)


Done.. check my post
 
Ok...

In MQ2PluginHandler.cpp change :
Rich (BB code):
CAutoLock Lock(&gPluginCS);
	DebugSpew("LoadMQ2Plugin(%s)",Filename);
	CHAR FullFilename[MAX_STRING]={0};
	sprintf(FullFilename,"%s\\%s.dll",gszINIPath,Filename);
    
    if (!mq2mainstamp) {
        mq2mainstamp = checkme((char*)GetModuleHandle("mq2main.dll"));
    }

	HMODULE hmod=LoadLibrary(FullFilename);
	if (!hmod)
	{
		DebugSpew("LoadMQ2Plugin(%s) Failed",Filename);
		return 0;
	}
    if (mq2mainstamp > checkme((char*)hmod)) {
        DebugSpew("Please recompile %s %d %d", FullFilename, mq2mainstamp, checkme((char*)hmod));
        FreeLibrary(hmod);
        return 0;
    }

	PMQPLUGIN pPlugin=pPlugins;
	while(pPlugin)
	{
		if (hmod==pPlugin->hModule)
		{
			DebugSpew("LoadMQ2Plugin(%s) already loaded",Filename);
			// LoadLibrary count must match FreeLibrary count for unloading to work.
			FreeLibrary(hmod);
			return 2; // already loaded
		}
		pPlugin=pPlugin->pNext;
	}

to look like :

Rich (BB code):
CAutoLock Lock(&gPluginCS);
	DebugSpew("LoadMQ2Plugin(%s)",Filename);
	CHAR FullFilename[MAX_STRING]={0};
	sprintf(FullFilename,"%s\\%s.dll",gszINIPath,Filename);
	HMODULE hmod=LoadLibrary(FullFilename);
	if (!hmod)
	{
		DebugSpew("LoadMQ2Plugin(%s) Failed",Filename);
		return 0;
	}

	PMQPLUGIN pPlugin=pPlugins;
	while(pPlugin)
	{
		if (hmod==pPlugin->hModule)
		{
			DebugSpew("LoadMQ2Plugin(%s) already loaded",Filename);
			// LoadLibrary count must match FreeLibrary count for unloading to work.
			FreeLibrary(hmod);
			return 2; // already loaded
		}
		pPlugin=pPlugin->pNext;
	}
 
yup, no doubt that he's gonna win, too bad for cronic though :p was sure he was going to get it this month....

But thanks DeadChanter, and I like the name also :D
 
Cronic has come in 2nd the last two times and refused a reward. If he gets 2nd again, I say he deserves an ipod as well as whoever gets 1st.
 
Tone said:
He's outta town till next monday :P, but cronic already had this the first day they added it and he emails it around with his plugins if you purchase em from him.

What cronic did (which is really kinda cool) is write a plugin t that worked only on
his plugins to get around this problem.

-j
 
did u read what dead explained? i am not sure what else there needs to be explained...goto the MQ2PluginHandler.cpp file and change what he said to change than save it.. Then just recompile and thats that

Or u can go to my thread and download the zip..it has this changed in it for ya if u dont know how to do it ureself
 
DeadChanter said:
Ok...

In MQ2PluginHandler.cpp change :
Rich (BB code):
CAutoLock Lock(&gPluginCS);
	DebugSpew("LoadMQ2Plugin(%s)",Filename);
	CHAR FullFilename[MAX_STRING]={0};
	sprintf(FullFilename,"%s\\%s.dll",gszINIPath,Filename);
    
    if (!mq2mainstamp) {
        mq2mainstamp = checkme((char*)GetModuleHandle("mq2main.dll"));
    }

	HMODULE hmod=LoadLibrary(FullFilename);
	if (!hmod)
	{
		DebugSpew("LoadMQ2Plugin(%s) Failed",Filename);
		return 0;
	}
    if (mq2mainstamp > checkme((char*)hmod)) {
        DebugSpew("Please recompile %s %d %d", FullFilename, mq2mainstamp, checkme((char*)hmod));
        FreeLibrary(hmod);
        return 0;
    }

	PMQPLUGIN pPlugin=pPlugins;
	while(pPlugin)
	{
		if (hmod==pPlugin->hModule)
		{
			DebugSpew("LoadMQ2Plugin(%s) already loaded",Filename);
			// LoadLibrary count must match FreeLibrary count for unloading to work.
			FreeLibrary(hmod);
			return 2; // already loaded
		}
		pPlugin=pPlugin->pNext;
	}

to look like :

Rich (BB code):
CAutoLock Lock(&gPluginCS);
	DebugSpew("LoadMQ2Plugin(%s)",Filename);
	CHAR FullFilename[MAX_STRING]={0};
	sprintf(FullFilename,"%s\\%s.dll",gszINIPath,Filename);
	HMODULE hmod=LoadLibrary(FullFilename);
	if (!hmod)
	{
		DebugSpew("LoadMQ2Plugin(%s) Failed",Filename);
		return 0;
	}

	PMQPLUGIN pPlugin=pPlugins;
	while(pPlugin)
	{
		if (hmod==pPlugin->hModule)
		{
			DebugSpew("LoadMQ2Plugin(%s) already loaded",Filename);
			// LoadLibrary count must match FreeLibrary count for unloading to work.
			FreeLibrary(hmod);
			return 2; // already loaded
		}
		pPlugin=pPlugin->pNext;
	}

Quoted for posterity.
 
MQ2Main.dll older than plugins. How does the check work?

Users who are viewing this thread

Back
Top