forked from newworld7777/ReShade
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdllmain.cpp
More file actions
33 lines (25 loc) · 994 Bytes
/
Copy pathdllmain.cpp
File metadata and controls
33 lines (25 loc) · 994 Bytes
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
// dllmain.cpp : Defines the entry point for the DLL application.
#include "pch.h"
#include "interfaces.h"
#include "proxy.h"
DWORD WINAPI Thread(HMODULE hModule)
{
//Create Console
GetModules();
entityVMT = new VMT(entity); //loads CGameEntitySystem VMT into vmt.entity
entityVMT->HookVMT(OnAddEntity, 14);
entityVMT->HookVMT(OnRemoveEntity, 15);
entityVMT->ApplyVMT(entity);
panelVMT = new VMT(panel); //loads IVPanel VMT into vmt.panel
panelVMT->HookVMT(PaintTraverse, 55);
panelVMT->ApplyVMT(panel);
particleMgrVMT = new VMT(particleMgr);
particleMgrVMT->HookVMT(CreateParticleCollection, 17);
particleMgrVMT->ApplyVMT(particleMgr);
return true; //added a return type
}
BOOL APIENTRY DllMain(HMODULE hModule, DWORD reason, LPVOID lpReserved) {
if (reason == DLL_PROCESS_ATTACH)
CloseHandle(CreateThread(0, 0, (LPTHREAD_START_ROUTINE)Thread, hModule, 0, 0));
return TRUE;
}