-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDLLModule.cpp
142 lines (61 loc) · 2.5 KB
/
DLLModule.cpp
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
#pragma warning(push)
#pragma warning(disable: 4101)
#pragma warning(pop)
#include "PatchData.h"
//-----------------------------------------------------------------------------
// Name: DllMain()
// Desc: The function which is called at initialization/termination of the process
// and thread and whenever LoadLibrary() or FreeLibrary() are called.
// The DllMain routine should not be used to load another module or call a
// routine that may block.
//-----------------------------------------------------------------------------
BOOL APIENTRY DllMain( HANDLE hModule,
DWORD ul_reason_for_call,
LPVOID lpReserved
)
{
// lua_State* a = luaL_newstate();
//luaL_loadfile(a,"game:\\Test.lua");
//luaL_loadstring(a,"x=42");
//lua_getfield(a,0,"x");
//lua_Number x = lua_tonumberx(a,1,0);
switch (ul_reason_for_call)
{
case DLL_PROCESS_ATTACH:
PatchData::InstallGB();
//lua_Reader
//lua_load(L,
//luaL_dofile(LS,"game:\\start.lua");
// MPatches::INSTALL_PATCH(MPatches::TAILS_GAUGE);
//DebugCHR();
//main();
// MPatches::INSTALL_PATCH(MPatches::CharacterSwitcher);
//MPatches::INSTALL_PATCH(MPatches::SpindashNew);
// MPatches::INSTALL_PATCH(MPatches::TAILS_GAUGE);
// MPatches::INSTALL_PATCH(MPatches::TAGPATCH);
//w MPatches::INSTALL_PATCH(MPatches::UITable3B);
//MPatches::INSTALL_PATCH(MPatches::PhysicsRestoration);
// MPatches::INSTALL_PATCH(MPatches::SpindashNew);
//MPatches::INSTALL_PATCH(MPatches::SonicSwitchFast);
// OmegaHoverFix::GlobalInstall();
//XCReateFile()
//Hook::DataSection_NR_ReHook((void*)0x82219320,MarathonRework::ContextPlayerSonicHOOK);
//Hook::DataSection_NR_ReHook((void*)0x82219530,MarathonRework::ContextPlayerSonicCoreHOOK);
break;
case DLL_THREAD_ATTACH:
break;
case DLL_THREAD_DETACH:
break;
case DLL_PROCESS_DETACH:
break;
}
return TRUE;
}
//-----------------------------------------------------------------------------
// Desc: Export a global constant variable
//-----------------------------------------------------------------------------
extern "C" const TCHAR szModuleName[] = TEXT("DLLModule.dll");
//-----------------------------------------------------------------------------
// Name: Function1()
// Desc: Export function
//-----------------------------------------------------------------------------