This repository has been archived by the owner on Oct 3, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 12
/
MQ2Plugin.h
51 lines (41 loc) · 1.64 KB
/
MQ2Plugin.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
/*****************************************************************************
Copyright (C) 2002-2003 Plazmic, 2003-2005 Lax
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2, as published by
the Free Software Foundation.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
******************************************************************************/
#ifdef ISXEQ
#include "ISXEQClient.h"
#define PreSetup(UNUSED)
#else
#ifndef _MQ2PLUGIN_H
#define _MQ2PLUGIN_H
#define MQ2PLUGIN
#include "MQ2Main/MQ2Main.h"
#include "MQ2Main/MQ2Globals.h"
#pragma comment(lib, "MQ2Main")
#define PLUGIN_API extern "C" __declspec(dllexport)
#define PLUGIN_VERSION(X) __declspec(dllexport) float MQ2Version = (float)X
//#define SetINIFileName(ini) sprintf_s(INIFileName,"%s\\%s",gszINIPath,ini);
extern CHAR INIFileName[MAX_STRING];
#define PreSetup(pluginname) CHAR INIFileName[MAX_STRING]={0};\
BOOL APIENTRY DllMain( HANDLE hModule, \
DWORD ul_reason_for_call, \
LPVOID lpReserved\
)\
{\
if (ul_reason_for_call==DLL_PROCESS_ATTACH)\
{\
DebugSpewAlways("%s Module Loaded",pluginname );\
sprintf_s(INIFileName,"%s\\%s.ini",gszINIPath,pluginname);\
}\
else if (ul_reason_for_call==DLL_PROCESS_DETACH)\
DebugSpewAlways("%s Module Unloaded",pluginname);\
return TRUE;\
}
#endif
#endif